Sign inGet Started

MailerSend से माइग्रेट करें

यह पेज MailerSend के send पेलोड, सप्रेशन सूचियों और webhooks को Bird से मैप करता है। मुख्य माइग्रेशन गाइड के चरण क्रम से पूरे करें, और चरण 1, 3 और 4 के लिए इन मैपिंग का उपयोग करें।

MailerSend पाँच सप्रेशन सूचियाँ रखता है, और उनमें से एक अपनी बनावट से ही अस्थायी है। चरण 3 से पहले सप्रेशन एक्सपोर्ट करें देखें: उस सूची को इम्पोर्ट करने पर 72 घंटे की रोक स्थायी ब्लॉक बन जाती है।

इसे अपने एजेंट को सौंपें

इसे Claude Code, Cursor या Codex में पेस्ट करें। एजेंट आपकी अपनी रिपॉज़िटरी पर इस पेज के चरण पूरे करता है, और उसके पास पहले से मौजूद Bird सतह का उपयोग करता है: अगर MCP सर्वर जुड़ा है तो वह, और अगर CLI इंस्टॉल है और उसमें साइन इन किया गया है तो वह।

कोड उदाहरण
I am moving an email integration from MailerSend 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/mailersend.md for the payload, suppression and webhook mapping, and https://bird.com/docs/guides/email/migrate.md for the order the steps go in.
3. Find and list my MailerSend usage in this repository before you change anything: calls to /v1/email and any SDK wrappers around them, whether I send with template_id and personalization or with html, the webhook handler and the URL it is registered at, and every domain I send from. Tell me the list before you edit anything.
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 MailerSend 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 suppressions 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. MailerSend keeps five lists under /v1/suppressions: hard bounces, spam complaints, unsubscribes and the blocklist are the four to carry over. Do NOT import the On Hold list: it is a temporary 72-hour hold that MailerSend clears by itself, and importing it would suppress those addresses permanently. 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. Both providers sign with HMAC-SHA256, so this is a re-implementation rather than new code: MailerSend sends one Signature header, Bird follows the Standard Webhooks scheme with webhook-id, webhook-timestamp and webhook-signature, and the signed string is constructed differently. Keep the constant-time comparison. 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 MailerSend path is a separate step that comes later: ask me again and wait for me to reply with the words retire the MailerSend 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 कॉल को मैप करें

MailerSend का POST /v1/email और हमारा POST /v1/email/messages एक जैसी संरचना रखते हैं। जिन अंतरों के लिए कोड बदलना पड़ता है, वे हैं टैग की सीमा और हर प्राप्तकर्ता का डेटा भेजने का तरीका।

यह क्या करता हैMailerSendBird
प्रेषकfrom ({email, name})from
प्राप्तकर्ताto (अधिकतम 50), cc / bcc (हर एक अधिकतम 10)to / cc / bcc (ऐरे)
विषयsubject (अधिकतम 998 अक्षर)subject
मुख्य भागhtml / texthtml / text (कम से कम एक)
जवाब देने का पताreply_to ({email, name})reply_to (ऐरे)
कस्टम हेडरheaders ({name, value}, उच्च प्लान)headers (string → string ऑब्जेक्ट)
फ़िल्टर करने योग्य लेबलtags (स्ट्रिंग का ऐरे, अधिकतम 5)tags: {name, value} जोड़े
सहेजा गया टेम्पलेटtemplate_id + personalizationtemplate + template.parameters (नीचे देखें)
अटैचमेंटattachments (content, filename, disposition, id)attachments
शेड्यूलिंगsend_at (अधिकतम 72 घंटे पहले तक)scheduled_at
बल्क प्राथमिकताprecedence_bulk(कोई समकक्ष नहीं, नीचे देखें)
श्रेणी(कोई नहीं)category: marketing (डिफ़ॉल्ट) या transactional
थ्रेडिंगin_reply_toheaders

हमारी फ़ील्ड सीमाएँ और डिफ़ॉल्ट मान (प्राप्तकर्ताओं की संख्या, टैग और मेटाडेटा की सीमाएँ) ईमेल भेजना में दिए गए हैं।

पोर्टिंग से जुड़ी बातें:

  • वहाँ पते ऑब्जेक्ट होते हैं और यहाँ स्ट्रिंग। {"email": "a@x.com", "name": "A"} बदलकर "A <a@x.com>" या सिर्फ़ "a@x.com" हो जाता है, और यह from, to, cc, bcc और reply_to सभी पर समान रूप से लागू होता है।
  • tags साधारण स्ट्रिंग होते हैं और अधिकतम पाँच हो सकते हैं। हमारे टैग जोड़े होते हैं। "welcome" जैसा टैग {"name": "category", "value": "welcome"} बन जाता है। एक स्थिर name चुनें, ताकि आपके डैशबोर्ड उसी तरह फ़िल्टर करें जैसे आपके MailerSend टैग आँकड़े करते थे।
  • personalization हर प्राप्तकर्ता के लिए अलग टेम्पलेट डेटा है। यह प्राप्तकर्ता के ईमेल पते के अनुसार कुंजीबद्ध एक ऐरे है। हमारा template.parameters पूरे भेजे गए संदेश पर लागू होता है। इसलिए जिस संदेश की सामग्री वाकई हर प्राप्तकर्ता के लिए अलग है, उसे हर प्राप्तकर्ता के लिए अलग भेजें या हर प्राप्तकर्ता के लिए एक बैच प्रविष्टि बनाएँ। अगर आपके personalization ऐरे में हर प्राप्तकर्ता के लिए एक जैसे मान हैं, तो वह एक ही template.parameters ऑब्जेक्ट में समा जाता है।
  • राउंड-ट्रिप संदर्भ के लिए MailerSend में कॉपी करने लायक कोई समकक्ष नहीं है। अगर आप tags से संदर्भ दोबारा बना रहे थे, तो उसकी जगह metadata का उपयोग करें। हम इसे हर webhook इवेंट में email_id/recipient_id के साथ लौटाते हैं, और इसमें पाँच प्रविष्टियों की कोई सीमा नहीं है।
  • precedence_bulk का कोई समकक्ष नहीं है, और category उसका समकक्ष नहीं है। precedence_bulk एक Precedence: bulk हेडर सेट करता है, जो ऑटोरिस्पॉन्डर और आउट-ऑफ़-ऑफ़िस एजेंट से जवाब न भेजने को कहता है। हमारा category सिर्फ़ यह तय करता है कि कौन-से सप्रेशन रिकॉर्ड और अनसब्सक्राइब प्राथमिकताएँ किसी संदेश को रोक सकती हैं। उसकी जगह category सेट करने से सप्रेशन का व्यवहार बदलता है, पर ऑटोरिस्पॉन्डर पर कोई असर नहीं पड़ता। अगर आपको यह हेडर चाहिए, तो ध्यान दें कि headers पते और प्लेटफ़ॉर्म से जुड़े नाम अस्वीकार करता है, पर इसे नहीं।
  • MailerSend में कस्टम हेडर और list_unsubscribe केवल कुछ प्लान में मिलते हैं। अगर आपके प्लान में ये शामिल नहीं थे, तो यहाँ ये उपलब्ध हैं। मार्केटिंग मेल पर हम list-unsubscribe को कैसे संभालते हैं, यह जानने के लिए ईमेल भेजना और श्रेणियाँ देखें।

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

MailerSend /v1/suppressions के अंतर्गत पाँच सूचियाँ रखता है, और हर सूची का अपना एक एंडपॉइंट है। इनमें से चार स्थायी हैं और इन्हें साथ लाया जाता है; पाँचवीं को नहीं लाना चाहिए।

इन्हें एक्सपोर्ट करें और इम्पोर्ट लूप से चलाएँ:

  • हार्ड बाउंस, उदाहरण के लिए GET https://api.mailersend.com/v1/suppressions/hard-bounces
  • स्पैम शिकायतें
  • अनसब्सक्राइब
  • ब्लॉकलिस्ट, यानी वे पते और पैटर्न जो आपने खुद जोड़े थे

On Hold सूची को इम्पोर्ट न करें। MailerSend के अपने विवरण के अनुसार इसमें वे पते रहते हैं जो "have soft bounced 5 times within 30 days", जो "these emails will be blocked for 72 hours", और जिन्हें फिर "automatically removed from the list"। यह एक अस्थायी रोक की अवधि है जिसे प्रदाता खुद ही हटा देता है। इसलिए इसे इम्पोर्ट करने पर अस्थायी रोक स्थायी सप्रेशन बन जाती है, और उन पतों पर मेल चुपचाप बंद हो जाती है जो जल्द ही रिलीज़ होने वाले थे। हमारे यहाँ इस व्यवहार के बराबर डेफ़रल है, जिसे हम इम्पोर्ट की गई सूची से नहीं, बल्कि लाइव डिलीवरी के नतीजों से संभालते हैं।

MailerSend के सूची प्रकार हमारे hard_bounce, complaint और manual कारणों से मेल खाते हैं; पूरा वर्गीकरण सप्रेशन में है।

वेबहुक इवेंट का अनुवाद करें

नतीजाMailerSendBird
स्वीकृत/प्रोसेस किया गयाactivity.sentemail.accepted → email.processed
डिलीवर हुआactivity.deliveredemail.delivered
अस्थायी विफलताactivity.soft_bounced / activity.deferredemail.deferred
स्थायी बाउंसactivity.hard_bouncedemail.bounced / email.out_of_band_bounce
स्पैम शिकायतactivity.spam_complaintemail.complained
खोला गयाactivity.opened / activity.opened_uniqueemail.opened
क्लिकactivity.clicked / activity.clicked_uniqueemail.clicked
अनसब्सक्राइबactivity.unsubscribedemail.unsubscribed / email.list_unsubscribed
अस्थायी रूप से रोका गयाrecipient.on_hold_added / ..._removed(कोई समकक्ष नहीं; ऊपर देखें)

आपके हैंडलर में कितना बदलाव होगा, यह दो अंतरों पर निर्भर करता है।

दोनों ओर HMAC-SHA256 से हस्ताक्षर होते हैं, इसलिए आपको नया कोड नहीं लिखना है, मौजूदा कोड को दोबारा लागू करना है। MailerSend एक ही Signature हेडर भेजता है, जिसमें उस webhook के साइनिंग सीक्रेट से गणना किया गया पेलोड का हैश होता है। हम Standard Webhooks स्कीम का पालन करते हैं, जो webhook-id, webhook-timestamp और webhook-signature का उपयोग करती है और id, timestamp और बॉडी से बनी स्ट्रिंग पर हस्ताक्षर करती है। इसलिए timestamp से आपको replay से सुरक्षा भी मिलती है। आपकी मौजूदा constant-time तुलना वैसी ही रखें और केवल स्ट्रिंग बनाने का तरीका बदलें; पूरी विधि Webhooks और इवेंट में है।

MailerSend ओपन और क्लिक को उनके unique रूपों से अलग रखता है। हम ऐसा नहीं करते। activity.opened और activity.opened_unique दोनों email.opened के रूप में आते हैं, इसलिए जो हैंडलर केवल unique रूप गिनता था, उसे खुद recipient_id के आधार पर डुप्लिकेट हटाने होंगे। हमारे डिलीवरी इवेंट हर प्राप्तकर्ता के लिए अलग होते हैं, इसलिए तीन प्राप्तकर्ताओं को एक भेजने पर एक नहीं, बल्कि तीन डिलीवरी परिणाम मिलते हैं।

स्विच करें

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

अगले कदम

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

इस विषय के लिए दस्तावेज़, गाइड और उदाहरणों के साथ आगे बढ़ें।