Sign inGet started

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

यह पेज Mailgun के POST /v3/{domain}/messages पैरामीटर्स, सप्रेशन लिस्ट और webhook इवेंट्स को Bird पर मैप करता है। मुख्य माइग्रेशन गाइड को क्रम से फ़ॉलो करें, और इन मैपिंग्स का उपयोग स्टेप 1, 3 और 4 के लिए करें।

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

इसे Claude Code, Cursor या Codex में पेस्ट करें। एजेंट आपकी अपनी रिपॉज़िटरी पर इस पेज को उसी Bird सरफ़ेस से प्रोसेस करता है जो उसके पास पहले से है: MCP सर्वर अगर कनेक्टेड है, या CLI अगर इंस्टॉल और साइन इन है।
कोड उदाहरण
I am moving an email integration from Mailgun 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/mailgun.md for the parameter, 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 Mailgun usage in this repository before you change anything: the /v3/{domain}/messages call sites and any SDK wrappers around them, every o:, v: and h: prefixed parameter I pass, my webhook handler and the URL it is registered at, and every Mailgun domain I send from. Mailgun scopes almost everything per domain, so keep that list of domains: the next two steps both work through it.
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 Mailgun 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 from Mailgun 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. Mailgun keeps three lists per domain, so pull GET /v3/{domain}/bounces, GET /v3/{domain}/complaints and GET /v3/{domain}/unsubscribes for every domain you found. 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. Two things need attention rather than translation: Mailgun reports one failed event with a severity field where Bird has separate deferred and bounced events, and Bird signs deliveries per Standard Webhooks rather than Mailgun's scheme, so treat verification as a rewrite. See 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 Mailgun path is a separate step that comes later: ask me again and wait for me to reply with the words retire the Mailgun 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 कॉल को मैप करें

Mailgun के form-encoded पैरामीटर प्रीफ़िक्स (o: options, v: variables, h: headers) सभी POST /v1/email/messages पर फ़र्स्ट-क्लास JSON फ़ील्ड बन जाते हैं:
क्या करता हैMailgunBird
प्रेषकfromfrom
प्राप्तकर्ताto / cc / bccto / cc / bcc (arrays)
विषयsubjectsubject
बॉडीhtml / texthtml / text (कम से कम एक)
Reply-toh:Reply-Toreply_to (array)
कस्टम हेडरh:X-*headers (string → string object)
फ़िल्टर करने योग्य लेबलo:tagtags: {name, value} pairs
राउंड-ट्रिप कॉन्टेक्स्टv:* / X-Mailgun-Variablesmetadata: arbitrary JSON
स्टोर्ड टेम्पलेटtemplate + t:variablestemplate + template.parameters
शेड्यूलिंगo:deliverytimescheduled_at
ओपन/क्लिक ट्रैकिंगo:tracking-opens / o:tracking-clickstrack_opens / track_clicks (default true)
कैटेगरी(कोई नहीं)category: marketing (default) या transactional
हमारी फ़ील्ड सीमाएँ और डिफ़ॉल्ट्स (प्राप्तकर्ता संख्या, टैग और मेटाडेटा सीमाएँ) ईमेल भेजना में दिए गए हैं।
पोर्टिंग नोट्स:
  • रिक्वेस्ट JSON बन जाती है। Mailgun multipart form data स्वीकार करता है। हम Content-Type: application/json के साथ JSON बॉडी लेते हैं। पोर्ट में यह आमतौर पर सबसे बड़ा मैकेनिकल बदलाव होता है।
  • v: variables इवेंट्स में इको होते थे। हमारा metadata भी उसी तरह काम करता है। हम हर webhook इवेंट पर आपके metadata (और tags) को email_id/recipient_id के साथ इको करते हैं, ताकि आपके हैंडलर्स को अलग से लुकअप किए बिना ये वापस मिल जाएँ।
  • Recipient variables सीधे पोर्ट नहीं होते। Mailgun के recipient-variables एक कॉल में कई प्राप्तकर्ताओं को पर्सनलाइज़ करते हैं। यहाँ यह काम batch endpoint का है, प्रति प्राप्तकर्ता एक एंट्री, हर एक के पास अपना कॉन्टेंट या {{ token }} substitution के लिए अपने parameters values।
  • स्टोर्ड टेम्पलेट सीधे पोर्ट होते हैं। Mailgun का template पैरामीटर हमारे template फ़ील्ड पर मैप होता है, values template.parameters में। देखें टेम्पलेट से भेजना
  • अटैचमेंट सीधे पोर्ट होते हैं। Mailgun multipart attachment / inline फ़ाइलें हमारी attachments array बन जाती हैं, base64 content के साथ (इनलाइन इमेज के लिए content_id सेट करें)। देखें अटैचमेंट

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

Mailgun तीन प्रति-डोमेन लिस्ट रखता है। हर एक को एक्सपोर्ट करें और इम्पोर्ट लूप से गुज़ारें:
  • GET /v3/{domain}/bounces
  • GET /v3/{domain}/complaints
  • GET /v3/{domain}/unsubscribes
हर सेंडिंग डोमेन के लिए दोहराएँ। Mailgun की लिस्ट डोमेन-स्कोप्ड हैं, जबकि हमारे सप्रेशन वर्कस्पेस-स्कोप्ड हैं, इसलिए आपके डोमेन की लिस्ट का यूनियन ही वह है जो आप इम्पोर्ट करते हैं।

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

Mailgun अस्थायी बनाम स्थायी विफलता को एक failed इवेंट और एक severity फ़ील्ड से दर्शाता है। हम उन्हें अलग करते हैं:
परिणामMailgunBird
स्वीकृत/प्रोसेस्डacceptedemail.acceptedemail.processed
डिलीवर हुआdeliveredemail.delivered
अस्थायी विफलताfailed (temporary)email.deferred
स्थायी बाउंसfailed (permanent)email.bounced / email.out_of_band_bounce
स्पैम शिकायतcomplainedemail.complained
ब्लॉक/सप्रेस्ड(कोई नहीं)email.rejected
ओपनopenedemail.opened
क्लिकclickedemail.clicked
अनसब्सक्राइबunsubscribedemail.list_unsubscribed
email.rejected का Mailgun में कोई समकक्ष नहीं है: हम सप्रेस्ड प्राप्तकर्ताओं को चुपचाप छोड़ने की बजाय स्पष्ट रूप से रिपोर्ट करते हैं (status rejected, rejection_reason: recipient_suppressed)। इसे बाउंस मानने की बजाय इसके लिए एक अलग हैंडलर जोड़ें।
सत्यापन भी बदलता है: Mailgun पेलोड के signature ऑब्जेक्ट के अंदर timestamp + token पर HMAC से साइन करता है, जबकि हम Standard Webhooks स्पेसिफ़िकेशन के अनुसार पेलोड फ़ील्ड की बजाय हेडर से साइन करते हैं। अपने सत्यापन कोड को Webhooks & events में दी गई रेसिपी से बदलें।

कटओवर

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

अगले कदम

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

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

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

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