Sign inGet Started

Mandrill से माइग्रेशन

यह पेज Mandrill (Mailchimp Transactional) के messages/send पेलोड, rejection blacklist और webhooks को Bird पर मैप करता है। मुख्य माइग्रेशन गाइड को क्रम से फ़ॉलो करें, और स्टेप 1, 3 और 4 के लिए ये मैपिंग्स इस्तेमाल करें।
पोर्ट में दो बड़े स्ट्रक्चर बदलाव हैं। Mandrill सबकुछ एक message ऑब्जेक्ट के अंदर रखता है और request body में key से ऑथेंटिकेट करता है। हम एक फ़्लैट टॉप-लेवल पेलोड और एक स्टैंडर्ड Authorization: Bearer हेडर लेते हैं। और Mandrill का recipient type (हर एड्रेस पर एक फ़ील्ड के रूप में to/cc/bcc) हमारे अलग to/cc/bcc arrays बन जाता है।

अपने एजेंट को यह दें

इसे Claude Code, Cursor, या Codex में पेस्ट करें। एजेंट आपकी रिपॉज़िटरी पर इस पेज को फ़ॉलो करता है, जो भी Bird सरफ़ेस उसके पास पहले से है उसका उपयोग करता है: MCP सर्वर अगर कनेक्ट है, या CLI अगर इंस्टॉल और साइन इन है।
कोड उदाहरण
I am moving an email integration from Mandrill to Bird. Route through it with me.
1. Check what you already have before setting anything up. If Bird's MCP server is connected, use its tools. If the Bird CLI is installed and signed in, use that. Either one is enough, and every step below is an action you take with whichever you have. Only if neither is present, follow https://bird.com/docs/ai/set-up-your-agent.md to set one up and sign me in. Every Bird docs page serves Markdown at its own URL with `.md` appended, so fetch that rather than the HTML.
2. Read https://bird.com/docs/guides/email/migrate/mandrill.md for the payload, suppression and event mapping, and https://bird.com/docs/guides/email/migrate.md for the order the steps go in.
3. Find and list my Mandrill usage in this repository before you change anything: the messages/send and messages/send-template call sites and any SDK wrappers around them, the webhook handler and the URL it is registered at, and every domain I send from. Mandrill authenticates with an API key passed in the request body rather than a header, so tell me every place that key appears in my code: the port changes how I authenticate, not just what I send, and that key is a secret currently sitting in a payload.
4. Register each of those sending domains with Bird and give me the DNS records to publish, following https://bird.com/docs/guides/email/sending-domains.md. Leave every DNS record my current provider uses exactly as it is: Bird's records are published alongside them and both providers authenticate side by side until I switch traffic. Publishing DNS affects mail for the whole domain, so show me the records and let me publish them.
5. Export my rejects from Mandrill and import them into Bird before any production traffic goes through Bird, so my first sends do not reach addresses that already bounced or complained. Read the list through rejects/list, and skip the soft-bounce rows: those are transient failures rather than suppressions, and importing them would suppress addresses that are fine. Show me how many rows you skipped. The Bird import takes one address per request and is idempotent, so a partial re-run is safe. https://bird.com/docs/guides/email/suppressions.md has the reason taxonomy.
6. Port the send call and the webhook handler using the mapping tables on the provider page. Move the API key out of the request body and into the Authorization header as a bearer token while you are there. Bird signs deliveries per Standard Webhooks rather than Mandrill's scheme, so treat verification as a rewrite rather than a URL change: https://bird.com/docs/guides/webhooks.md and https://bird.com/docs/guides/email/events.md.
7. Run my whole integration against Bird's mail sandbox before any production traffic, following https://bird.com/docs/guides/email/testing-sandbox.md. Sandbox sends run the real pipeline without reaching an inbox or touching my sending reputation.
8. Stop and ask me wherever a step needs a decision. Do not point production traffic at Bird until I have seen the sandbox results and replied with the words cut over to Bird. Retiring the Mandrill path is a separate step that comes later: ask me again and wait for me to reply with the words retire the Mandrill path. A reply that agrees without naming what it is authorising is not authorisation. Finish by telling me what is left that only a person can do.

Send कॉल को मैप करें

क्या करता हैMandrill (messages/send)Bird
Authrequest body में keyAuthorization: Bearer bk_... हेडर
प्रेषकmessage.from_email / from_namefrom: string या { "email", "name" }
प्राप्तकर्ताmessage.to: [{ email, name, type }]to / cc / bcc: type फ़ील्ड के अनुसार विभाजित
विषयmessage.subjectsubject
बॉडीmessage.html / message.texthtml / text (कम से कम एक)
Reply-tomessage.headers["Reply-To"]reply_to: array
कस्टम हेडरmessage.headersheaders: string → string object
फ़िल्टर करने योग्य लेबलmessage.tags: बेयर stringstags: { name, value } pairs
राउंड-ट्रिप कॉन्टेक्स्टmessage.metadatametadata: arbitrary JSON
स्टोर्ड टेम्पलेटmessages/send-template + merge_varstemplate + template.parameters
शेड्यूलिंगsend_atscheduled_at
ओपन/क्लिक ट्रैकिंगmessage.track_opens / track_clickstrack_opens / track_clicks (default true)
अटैचमेंट्सmessage.attachments: { type, name, content }attachments: { content_type, filename, content }
इनलाइन इमेजmessage.images: { type, name, content }attachments with content_id
कैटेगरीsubaccount / tags conventioncategory: marketing (default) या transactional
हमारी फ़ील्ड सीमाएँ और डिफ़ॉल्ट्स (प्राप्तकर्ता संख्या, tag और metadata सीमाएँ) ईमेल भेजना में हैं।
पोर्टिंग नोट्स:
  • फ़्लैट करें और दोबारा auth करें। message wrapper हटाएँ (इसकी फ़ील्ड्स टॉप लेवल पर आ जाती हैं) और API key को body से निकालकर Authorization हेडर में डालें। key फ़ील्ड का यहाँ कोई समकक्ष नहीं है।
  • प्राप्तकर्ताओं को type के अनुसार बाँटें। Mandrill हर प्राप्तकर्ता को एड्रेस ऑब्जेक्ट पर to, cc, या bcc मार्क करता है। हम तीन अलग arrays इस्तेमाल करते हैं। पोर्ट करते समय to लिस्ट को उसके type फ़ील्ड के अनुसार बाँटें।
  • Tags name/value pairs बन जाते हैं। Mandrill के tags बेयर strings हैं ("welcome")। हमारे tags { name, value } pairs हैं। एक स्थिर name चुनें, उदाहरण के लिए { "name": "category", "value": "welcome" }, ताकि आपके फ़िल्टर और एनालिटिक्स वैसे ही ग्रुप करें जैसे आपके Mandrill stats करते थे। metadata सीधे JSON के रूप में पोर्ट होता है।
  • स्टोर्ड टेम्पलेट पोर्ट होते हैं, एक कैवीएट के साथ। Mandrill का messages/send-template हमारा template फ़ील्ड बन जाता है (ID या slug से रेफ़रेंस) जिसके values template.parameters में होते हैं। टेम्पलेट के साथ भेजना देखें। हमारे टेम्पलेट वेरिएबल्स प्रति मैसेज हैं, प्रति प्राप्तकर्ता नहीं, इसलिए प्रति-प्राप्तकर्ता merge_vars एक-एक batch एंट्री प्रति प्राप्तकर्ता बन जाते हैं, हर एक का अपना parameters।
  • अटैचमेंट सीधे पोर्ट होते हैं। Mandrill का base64 content हमारा content है, और इनलाइन images (HTML में cid: के रूप में रेफ़रेंस किए गए) attachments एंट्रीज़ बन जाते हैं जिनमें content_id होता है। अटैचमेंट देखें।

सप्रेशन एक्सपोर्ट करें

Mandrill अवांछित एड्रेस अपनी rejection blacklist पर रखता है। इसे rejects/list API से पुल करें (या Rejection Blacklist व्यू से एक्सपोर्ट करें)। हर एंट्री में एक reason होता है (hard-bounce, soft-bounce, spam, unsub, custom)। soft-bounce पंक्तियों को छोड़ दें क्योंकि वे अस्थायी विफलताएँ दर्शाती हैं, सच्चे सप्रेशन नहीं। बाकी को इम्पोर्ट लूप से गुज़ारें।

Webhook इवेंट्स ट्रांसलेट करें

Mandrill बैच किए हुए इवेंट arrays पोस्ट करता है; event value को Bird की इवेंट शब्दावली पर मैप करें:
परिणामMandrillBird
भेजा / स्वीकृतsendemail.accepted → email.processed
डिलीवर हुआdeliveredemail.delivered
अस्थायी विफलताdeferralemail.deferred
स्थायी बाउंसhard_bounceemail.bounced / email.out_of_band_bounce
सॉफ़्ट बाउंसsoft_bounceemail.deferred (फिर email.bounced अगर छोड़ देता है)
स्पैम शिकायतspamemail.complained
अनसब्सक्राइबunsubemail.unsubscribed / email.list_unsubscribed
अस्वीकृत/ब्लॉकrejectemail.rejected
ओपनopenemail.opened
क्लिकclickemail.clicked
कोड में दो अंतर ध्यान रखें:
  • स्वीकृति यहाँ दो इवेंट्स में बँटती है। Mandrill का send मतलब मैसेज इंजेक्ट हुआ और delivered मतलब प्राप्तकर्ता सर्वर ने इसे ले लिया, जो वही अंतर है जो हम करते हैं। फ़र्क़ सिर्फ़ हमारी तरफ़ है: हम email.delivered से पहले स्वीकृति (email.accepted) को प्रोसेसिंग (email.processed) से अलग करते हैं, तो जो हैंडलर सिर्फ़ send पर निर्भर था उसे अब दो इवेंट्स में से चुनना होगा।
  • इवेंट्स प्राप्तकर्ता-स्कोप्ड हैं और अलग तरीके से साइन होते हैं। हमारे डिलीवरी इवेंट्स में email_id के साथ recipient_id होता है, प्रति प्राप्तकर्ता एक स्ट्रीम। हम प्रति request एक इवेंट डिलीवर करते हैं और Standard Webhooks स्पेसिफ़िकेशन के अनुसार साइन करते हैं। Mandrill इसके बजाय X-Mandrill-Signature HMAC से बैच किए हुए arrays साइन करता है। सत्यापन के लिए Webhooks और इवेंट्स देखें।

कटओवर करें

मुख्य गाइड में डोमेन और DNS और सैंडबॉक्स स्मोक टेस्ट पूरे करें। दोनों प्रोवाइडर-स्वतंत्र हैं।

अगले कदम

  • भेजने वाले डोमेन: रजिस्ट्रेशन, सत्यापन जीवनचक्र, और वे DNS रिकॉर्ड जिन्हें आप री-पॉइंट कर रहे हैं
  • Webhooks और इवेंट: एंडपॉइंट सेटअप और Standard Webhooks सत्यापन
  • टेस्टिंग सैंडबॉक्स: कटओवर से पहले नए इंटीग्रेशन का स्मोक-टेस्ट करें
  • सप्रेशन: अपनी इम्पोर्ट की गई सूची की पुष्टि करें और जानें कि अब से हम इसे कैसे बनाए रखते हैं

संबंधित संसाधन

इस विषय के लिए डॉक्यूमेंटेशन, गाइड और उदाहरणों के साथ आगे बढ़ें। संसाधन अंग्रेज़ी में हैं।

अभ्यास करें और इम्प्लीमेंटेशन ब्रीफ़ पाएँ