Sign inGet started

Migration von Mandrill

Diese Seite ordnet Mandrills (Mailchimp Transactional) messages/send-Payload, Rejection-Blacklist und Webhooks Bird zu. Folgen Sie dem Hauptmigrationsleitfaden der Reihe nach und verwenden Sie diese Zuordnungen für die Schritte 1, 3 und 4.
Zwei strukturelle Änderungen dominieren die Portierung. Mandrill verschachtelt alles unter einem message-Objekt und authentifiziert mit einem key im Request-Body. Wir verwenden einen flachen Top-Level-Payload und einen Standard-Authorization: Bearer-Header. Mandrills Empfänger-type (to/cc/bcc als Feld auf jedem Adressobjekt) wird zu unseren separaten to/cc/bcc-Arrays.

Übergeben Sie das Ihrem Agenten

Fügen Sie das in Claude Code, Cursor oder Codex ein. Der Agent arbeitet diese Seite gegen Ihr eigenes Repository ab und nutzt die Bird-Oberfläche, die er bereits hat: den MCP-Server, falls einer verbunden ist, oder die CLI, falls sie installiert und angemeldet ist.
Codebeispiel
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-Aufruf zuordnen

FunktionMandrill (messages/send)Bird
Authkey im Request-BodyAuthorization: Bearer bk_...-Header
Absendermessage.from_email / from_namefrom: String oder { "email", "name" }
Empfängermessage.to: [{ email, name, type }]to / cc / bcc: aufgeteilt nach dem type-Feld
Betreffmessage.subjectsubject
Inhaltmessage.html / message.texthtml / text (mindestens eines)
Reply-tomessage.headers["Reply-To"]reply_to: Array
Eigene Headermessage.headersheaders: String-→-String-Objekt
Filterbare Labelsmessage.tags: einfache Stringstags: { name, value }-Paare
Round-Trip-Kontextmessage.metadatametadata: beliebiges JSON
Gespeichertes Templatemessages/send-template + merge_varstemplate + template.parameters
Zeitplanungsend_atscheduled_at
Open-/Click-Trackingmessage.track_opens / track_clickstrack_opens / track_clicks (Standard true)
Anhängemessage.attachments: { type, name, content }attachments: { content_type, filename, content }
Inline-Bildermessage.images: { type, name, content }attachments mit content_id
KategorieSubaccount-/Tags-Konventioncategory: marketing (Standard) oder transactional
Unsere Feldlimits und Standardwerte (Empfängeranzahl, Tag- und Metadaten-Limits) finden Sie unter E-Mail senden.
Portierungshinweise:
  • Flachklopfen und neu authentifizieren. Entfernen Sie den message-Wrapper (seine Felder wandern auf die oberste Ebene) und verschieben Sie den API-Schlüssel aus dem Body in den Authorization-Header. Das key-Feld hat hier kein Gegenstück.
  • Empfänger nach type aufteilen. Mandrill markiert jeden Empfänger mit to, cc oder bcc auf dem Adressobjekt. Wir verwenden drei separate Arrays. Verteilen Sie die to-Liste beim Portieren nach ihrem type-Feld.
  • Tags werden Name/Wert-Paare. Mandrill-Tags sind einfache Strings ("welcome"). Unsere Tags sind { name, value }-Paare. Wählen Sie einen stabilen name, zum Beispiel { "name": "category", "value": "welcome" }, damit Ihre Filter und Analysen genauso gruppieren wie Ihre Mandrill-Statistiken. metadata wird direkt als JSON übernommen.
  • Gespeicherte Templates werden portiert, mit einem Vorbehalt. Mandrills messages/send-template wird zu unserem template-Feld (referenziert per ID oder Slug) mit Werten in template.parameters. Siehe Senden mit einem Template. Unsere Template-Variablen gelten pro Nachricht statt pro Empfänger. Empfängerspezifische merge_vars werden daher zu je einem Batch-Eintrag pro Empfänger, jeweils mit eigenem parameters.
  • Anhänge werden direkt portiert. Mandrills Base64-content ist unser content, und Inline-images (im HTML als cid: referenziert) werden zu attachments-Einträgen mit content_id. Siehe Anhänge.

Suppressions exportieren

Mandrill speichert unerwünschte Adressen in seiner Rejection-Blacklist. Rufen Sie diese mit rejects/list API ab (oder exportieren Sie über die Rejection-Blacklist-Ansicht). Jeder Eintrag hat einen Grund (hard-bounce, soft-bounce, spam, unsub, custom). Überspringen Sie die soft-bounce-Zeilen, da diese vorübergehende Fehler beschreiben und keine echten Suppressions sind. Führen Sie den Rest durch die Import-Schleife.

Webhook-Events übersetzen

Mandrill sendet gebündelte Event-Arrays; ordnen Sie den event-Wert dem Event-Vokabular von Bird zu:
ErgebnisMandrillBird
Gesendet / akzeptiertsendemail.acceptedemail.processed
Zugestelltdeliveredemail.delivered
Temporärer Fehlerdeferralemail.deferred
Permanenter Bouncehard_bounceemail.bounced / email.out_of_band_bounce
Soft Bouncesoft_bounceemail.deferred (dann email.bounced, falls aufgegeben)
Spam-Beschwerdespamemail.complained
Abmeldungunsubemail.unsubscribed / email.list_unsubscribed
Abgelehnt/blockiertrejectemail.rejected
Öffnungopenemail.opened
Klickclickemail.clicked
Zwei Unterschiede, die Sie im Code berücksichtigen müssen:
  • Akzeptanz wird hier in zwei Events aufgeteilt. Mandrills send bedeutet, dass die Nachricht eingespeist wurde, und delivered bedeutet, dass der empfangende Server sie angenommen hat – dieselbe Unterscheidung, die wir treffen. Der Unterschied liegt nur auf unserer Seite: Wir trennen Akzeptanz (email.accepted) von Verarbeitung (email.processed) vor email.delivered. Ein Handler, der nur auf send reagiert hat, muss jetzt zwischen zwei Events wählen.
  • Events sind empfängerbezogen und anders signiert. Unsere Zustellungs-Events enthalten recipient_id neben email_id, mit einem Stream pro Empfänger. Wir liefern ein Event pro Request und signieren es gemäß der Standard-Webhooks-Spezifikation. Mandrill signiert stattdessen gebündelte Arrays mit einem X-Mandrill-Signature HMAC. Siehe Webhooks & Events zur Verifizierung.

Umstellung

Arbeiten Sie Domains & DNS und den Sandbox-Smoke-Test im Hauptleitfaden durch. Beides ist anbieterunabhängig.

Nächste Schritte

  • Absenderdomains: Registrierung, Verifizierungslebenszyklus und die DNS-Einträge, die Sie umleiten
  • Webhooks & Events: Endpoint-Einrichtung und Standard-Webhooks-Verifizierung
  • Test-Sandbox: Smoke-Test der neuen Integration vor der Umstellung
  • Suppressions: Ihre importierte Liste prüfen und wie wir sie ab jetzt pflegen