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: विकल्प, v: वेरिएबल, h: हेडर) सभी POST /v1/email/messages पर स्वतंत्र JSON फ़ील्ड बन जाते हैं:

यह क्या करता हैMailgunBird
प्रेषकfromfrom
प्राप्तकर्ताto / cc / bccto / cc / bcc (ऐरे)
विषयsubjectsubject
मुख्य भागhtml / texthtml / text (कम से कम एक)
जवाब का पताh:Reply-Toreply_to (ऐरे)
कस्टम हेडरh:X-*headers (string → string ऑब्जेक्ट)
फ़िल्टर करने योग्य लेबलo:tagtags: {name, value} जोड़े
इवेंट में वापस मिलने वाला संदर्भv:* / X-Mailgun-Variablesmetadata: कोई भी JSON
सहेजा गया टेम्पलेटtemplate + t:variablestemplate + template.parameters
शेड्यूल करनाo:deliverytimescheduled_at
ओपन/क्लिक ट्रैकिंगo:tracking-opens / o:tracking-clickstrack_opens / track_clicks (डिफ़ॉल्ट true)
श्रेणी(कोई नहीं)category: marketing (डिफ़ॉल्ट) या transactional

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

पोर्टिंग से जुड़े नोट:

  • अनुरोध JSON बन जाता है। Mailgun मल्टीपार्ट फ़ॉर्म डेटा स्वीकार करता है। हम Content-Type: application/json के साथ JSON बॉडी लेते हैं। पोर्ट में आम तौर पर यही सबसे बड़ा यांत्रिक बदलाव होता है।
  • v: वेरिएबल इवेंट में वापस लौटाए जाते थे। हमारा metadata भी इसी तरह काम करता है। हम हर वेबहुक इवेंट पर email_id/recipient_id के साथ आपका metadata (और tags) वापस भेजते हैं, इसलिए आपके हैंडलर को ये मान अलग से खोजे बिना मिल जाते हैं।
  • रिसिपिएंट वेरिएबल हूबहू पोर्ट नहीं होते। Mailgun के recipient-variables एक ही कॉल में कई प्राप्तकर्ताओं के लिए सामग्री को वैयक्तिकृत करते हैं। यहाँ यह काम बैच एंडपॉइंट करता है। इसमें हर प्राप्तकर्ता की एक अलग प्रविष्टि होती है, और हर प्रविष्टि में उसकी अपनी सामग्री या {{ token }} प्रतिस्थापन के लिए उसके अपने parameters मान होते हैं।
  • सहेजे गए टेम्पलेट सीधे पोर्ट होते हैं। Mailgun का template पैरामीटर हमारे template फ़ील्ड से मेल खाता है, और मान template.parameters में जाते हैं। टेम्पलेट के साथ भेजना देखें।
  • अटैचमेंट सीधे पोर्ट होते हैं। Mailgun की मल्टीपार्ट attachment / inline फ़ाइलें हमारी attachments ऐरे बन जाती हैं, जिसमें base64 content होता है (इनलाइन इमेज के लिए content_id सेट करें)। अटैचमेंट देखें।

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

Mailgun हर डोमेन के लिए तीन सूचियाँ रखता है। हर सूची एक्सपोर्ट करें और उसे इम्पोर्ट लूप से चलाएँ:

  • GET /v3/{domain}/bounces
  • GET /v3/{domain}/complaints
  • GET /v3/{domain}/unsubscribes

हर भेजने वाले डोमेन के लिए यह दोहराएँ। Mailgun की सूचियाँ डोमेन के स्तर पर होती हैं, जबकि हमारे सप्रेशन वर्कस्पेस के स्तर पर होते हैं। इसलिए आप अपने सभी डोमेन की सूचियों को मिलाकर इम्पोर्ट करते हैं।

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

Mailgun अस्थायी और स्थायी विफलता को एक ही failed इवेंट और एक severity फ़ील्ड से बताता है। हम इन्हें अलग-अलग इवेंट में बाँटते हैं:

परिणामMailgunBird
स्वीकार/प्रोसेस किया गयाacceptedemail.accepted → email.processed
डिलीवर हुआdeliveredemail.delivered
अस्थायी विफलताfailed (अस्थायी)email.deferred
स्थायी बाउंसfailed (स्थायी)email.bounced / email.out_of_band_bounce
स्पैम शिकायतcomplainedemail.complained
ब्लॉक किया गया/सप्रेस किया गया(कोई नहीं)email.rejected
ओपनopenedemail.opened
क्लिकclickedemail.clicked
सदस्यता समाप्तunsubscribedemail.list_unsubscribed

Mailgun में email.rejected का कोई समकक्ष नहीं है: हम सप्रेस किए गए प्राप्तकर्ताओं को चुपचाप छोड़ने के बजाय स्पष्ट रूप से रिपोर्ट करते हैं (स्टेटस rejected, rejection_reason: recipient_suppressed)। इसे बाउंस मानने के बजाय इसके लिए अलग हैंडलर जोड़ें।

सत्यापन का तरीका भी बदलता है: Mailgun पेलोड के signature ऑब्जेक्ट के भीतर timestamp + token पर HMAC से हस्ताक्षर करता है, जबकि हम Standard Webhooks स्पेसिफिकेशन के अनुसार पेलोड फ़ील्ड के बजाय हेडर के साथ हस्ताक्षर करते हैं। अपने सत्यापन कोड को वेबहुक और इवेंट में दिए गए तरीके से बदलें।

स्विच करें

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

अगले कदम

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

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