Sign inGet started

Migrasi dari Mandrill

Halaman ini memetakan payload messages/send Mandrill (Mailchimp Transactional), rejection blacklist, dan webhook ke Bird. Ikuti panduan migrasi utama secara berurutan, dan gunakan pemetaan ini untuk langkah 1, 3, dan 4.
Dua perubahan struktur mendominasi proses porting. Mandrill menyarangkan semuanya di bawah objek message dan melakukan autentikasi dengan key di body request. Kami menggunakan payload top-level yang datar dan header Authorization: Bearer standar. Dan type penerima Mandrill (to/cc/bcc sebagai field pada setiap alamat) menjadi array to/cc/bcc terpisah di sisi kami.

Serahkan ini ke agent Anda

Tempel ini ke Claude Code, Cursor, atau Codex. Agent akan memproses halaman ini terhadap repositori Anda sendiri, menggunakan surface Bird mana pun yang sudah tersedia: server MCP jika sudah terhubung, atau CLI jika sudah terinstal dan sudah login.
Contoh kode
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.

Petakan panggilan send

FungsiMandrill (messages/send)Bird
Authkey di body requestHeader Authorization: Bearer bk_...
Pengirimmessage.from_email / from_namefrom: string atau { "email", "name" }
Penerimamessage.to: [{ email, name, type }]to / cc / bcc: dipisahkan berdasarkan field type
Subjekmessage.subjectsubject
Bodymessage.html / message.texthtml / text (minimal salah satu)
Reply-tomessage.headers["Reply-To"]reply_to: array
Header kustommessage.headersheaders: objek string → string
Label yang dapat difiltermessage.tags: string biasatags: pasangan { name, value }
Konteks round-tripmessage.metadatametadata: JSON arbitrer
Template tersimpanmessages/send-template + merge_varstemplate + template.parameters
Penjadwalansend_atscheduled_at
Pelacakan open/clickmessage.track_opens / track_clickstrack_opens / track_clicks (default true)
Lampiranmessage.attachments: { type, name, content }attachments: { content_type, filename, content }
Gambar inlinemessage.images: { type, name, content }attachments dengan content_id
Kategorikonvensi subaccount / tagscategory: marketing (default) atau transactional
Batas dan default field kami (jumlah penerima, batas tag dan metadata) ada di Mengirim email.
Catatan porting:
  • Ratakan dan autentikasi ulang. Hapus wrapper message (field-nya pindah ke top level) dan pindahkan key API dari body ke header Authorization. Field key tidak memiliki padanan di sini.
  • Pisahkan penerima berdasarkan type. Mandrill menandai setiap penerima to, cc, atau bcc pada objek alamat. Kami menggunakan tiga array terpisah. Kelompokkan daftar to berdasarkan field type saat Anda melakukan porting.
  • Tag menjadi pasangan name/value. Tag Mandrill adalah string biasa ("welcome"). Tag kami adalah pasangan { name, value }. Pilih name yang konsisten, misalnya { "name": "category", "value": "welcome" }, agar filter dan analitik Anda dikelompokkan seperti statistik Mandrill sebelumnya. metadata dapat langsung dipindahkan sebagai JSON.
  • Template tersimpan dapat dipindahkan, dengan satu catatan. messages/send-template Mandrill menjadi field template kami (direferensikan berdasarkan ID atau slug) dengan nilai di template.parameters. Lihat mengirim dengan template. Variabel template kami bersifat per pesan, bukan per penerima, sehingga merge_vars per penerima menjadi satu entri batch per penerima, masing-masing dengan parameters sendiri.
  • Lampiran dapat langsung dipindahkan. content base64 Mandrill adalah content kami, dan images inline (direferensikan sebagai cid: di HTML) menjadi entri attachments dengan content_id. Lihat lampiran.

Ekspor supresi

Mandrill menyimpan alamat yang tidak diinginkan di rejection blacklist-nya. Tarik daftar tersebut dengan rejects/list API (atau ekspor dari tampilan Rejection Blacklist). Setiap entri memiliki alasan (hard-bounce, soft-bounce, spam, unsub, custom). Lewati baris soft-bounce karena itu menjelaskan kegagalan sementara, bukan supresi yang sebenarnya. Jalankan sisanya melalui loop impor.

Terjemahkan event webhook

Mandrill mengirim array event dalam batch; petakan nilai event ke kosakata event Bird:
HasilMandrillBird
Terkirim / diterimasendemail.acceptedemail.processed
Tersampaikandeliveredemail.delivered
Kegagalan sementaradeferralemail.deferred
Bounce permanenhard_bounceemail.bounced / email.out_of_band_bounce
Soft bouncesoft_bounceemail.deferred (lalu email.bounced jika menyerah)
Keluhan spamspamemail.complained
Berhenti berlanggananunsubemail.unsubscribed / email.list_unsubscribed
Ditolak/diblokirrejectemail.rejected
Openopenemail.opened
Clickclickemail.clicked
Dua perbedaan yang perlu Anda tangani dalam kode:
  • Penerimaan terbagi menjadi dua event di sini. send Mandrill berarti pesan telah diinjeksi dan delivered berarti server penerima menerimanya, yang merupakan pembedaan yang sama. Perbedaannya hanya di sisi kami: kami memisahkan penerimaan (email.accepted) dari pemrosesan (email.processed) sebelum email.delivered, sehingga handler yang sebelumnya hanya menggunakan send kini harus memilih di antara dua event.
  • Event berskala per penerima dan ditandatangani secara berbeda. Event pengiriman kami memiliki recipient_id di samping email_id, dengan satu stream per penerima. Kami mengirim satu event per request dan menandatanganinya sesuai spesifikasi Standard Webhooks. Mandrill sebaliknya menandatangani array batch dengan X-Mandrill-Signature HMAC. Lihat Webhook & event untuk verifikasi.

Cutover

Ikuti langkah domain & DNS dan sandbox smoke test di panduan utama. Keduanya tidak bergantung pada provider tertentu.

Langkah selanjutnya

  • Domain pengiriman: registrasi, siklus hidup verifikasi, dan catatan DNS yang Anda arahkan ulang
  • Webhook & event: pengaturan endpoint dan verifikasi Standard Webhooks
  • Sandbox pengujian: uji coba integrasi baru sebelum cutover
  • Supresi: konfirmasi daftar yang diimpor dan cara kami mengelolanya selanjutnya