Most migrations off Resend fail in the DNS cutover window, not in the send API swap. Teams lose mail to lingering DKIM selectors, suppression drift, and skipped parallel runs after the SDK change compiles. Here are five engineering pitfalls and a four-phase checklist.
Operator Notes
Resend
Migration
Why teams migrate off Resend
Engineering teams rarely leave Resend because the sending SDK underperforms; they migrate when multi-domain routing, raw inbound ownership, or scale economics outgrow a single-vendor workflow.
Per-domain channel control: routing transactional domains, customer-facing workspaces, and staging environments across separate outbound providers without maintaining parallel integrations.
Inbound and storage ownership: capturing raw MIME streams, attachments, and custom route tables inside your own edge workers or object storage.
Volume cost curves: Resend Pro starts at $20/month for 50,000 emails and bills $0.90 per 1,000 above that cap, pushing high-volume senders toward raw relays or hybrid setups.
5 hard lessons learned when migrating off Resend
Five operational failure modes account for almost every production incident when moving away from Resend. Each breaks silently unless caught before traffic shifts.
Cold IP/path throttling and unseen template divergence
Feature-flag canary (5% → 25% → 100%)
Webhook & suppression drift
Payload/event mismatch and unmigrated bounce lists
Export bounces pre-cutover; normalize events
Inbound MIME & loops
25 MiB worker ceiling and missing Auto-Submitted checks
Guard payload size and loop headers early
Stale agent/CLI keys
RESEND_API_KEY left in MCP, CLI, or cron secrets
Audit non-app consumers; scope keys per domain
1. Silent mail drops in the DNS & DKIM cutover window
Symptom: Messages land in spam or bounce with DMARC alignment errors right after switching relays. Root cause: Long DNS TTLs cache stale MX/SPF records while stacked include: mechanisms exceed RFC 7208’s 10-lookup ceiling (PermError), and stale resend._domainkey TXT records split signing reputation. Fix: Lower TTLs to 60–300 seconds 48 hours ahead, run both DKIM selectors in parallel during overlap, and prune unused SPF includes.
2. Skipping parallel dual-run for a big-bang cutover
Symptom: Sudden 4xx deferrals from Gmail or Microsoft and runtime crashes on edge templates. Root cause: API call-site parity does not guarantee warm IP reputation or identical header normalization on day one. Fix: Gate the new sender behind a feature flag and ramp canary traffic (5% → 25% → 100%) across 5–7 days while watching deferral codes.
3. Webhook schema, state machine, and suppression list drift
Symptom: Billing and auth state machines stall, or the new relay re-mails previously hard-bounced users and tanks domain reputation. Root cause: Resend dispatches { type, data } for email.delivered, email.bounced, and email.complained; targets like AWS SES (SNS notifications) or event-log platforms differ in payload shape, retry ladders, and bounce sub-types, and never inherit Resend’s suppression list. Fix: Export hard bounces and complaints beforehand, check recipients locally before enqueueing, and keep webhook consumers idempotent.
4. Inbound routing, MIME parsing, and attachment ceilings
Symptom: Inbound webhooks fail on large attachments, or auto-responders trigger infinite forwarding loops. Root cause: Moving from Resend Inbound’s pre-parsed JSON to raw SMTP streams on Cloudflare Email Routing and Workers shifts MIME parsing (postal-mime), the 25 MiB message ceiling, and loop detection onto your own code. Fix: Reject or offload oversized MIME parts early, ignore messages carrying Auto-Submitted or X-Loop, and dedupe on SMTP Message-ID.
5. Credential and environment leaks in AI agents and automation
Symptom: Agent workflows and staging jobs keep hitting Resend weeks after the main app cut over. Root cause:RESEND_API_KEY tokens tucked into MCP server configs, CLI .env files, and cron scripts outside the web repo. Fix: Inventory every non-app consumer, issue domain-scoped keys per environment, and verify zero legacy API calls before revocation.
Follow four sequential phases so DNS propagation, reputation warming, and key rotation never collide in the same deployment window.
Phase
Timing
Exit gate
1. Pre-flight
T-48 hours
Low TTLs live; suppression list & keys inventoried
2. Dual-Run
Days 1–7
Shadow/canary parity verified; zero DMARC drops
3. Cutover
Low-traffic window
100% outbound + inbound MX verified end-to-end
4. Cleanup
T+72 hours
Stale DKIM/SPF pruned; old key revoked
Phase 1 (Pre-flight): Lower DNS TTLs to 60–300s, baseline MX/SPF/DMARC/DKIM, export Resend hard bounces and complaints into local storage, and list all app, CI, CLI, and MCP keys.
Phase 2 (Dual-Run): Publish new DKIM selectors alongside Resend’s, verify HMAC signature checks and Message-ID idempotency on canary traffic, and ramp outbound from 5% to 50%.
Phase 3 (Cutover): Switch outbound to 100%, update inbound MX or routing records with a rollback flag ready, rotate agent/MCP/CLI credentials, and confirm live send/receive round-trips.
Phase 4 (Cleanup): Wait 48–72 hours for trailing bounce webhooks to drain, delete resend._domainkey and unused SPF includes, and revoke the legacy Resend API key.
DNS-first inbound without custom workers: Add two records in your own zone — apex MX @ → mx.flowmails.net and a _flowmails-verify TXT — with host detection and one-click Domain Connect redirects on Cloudflare and GoDaddy. Route-table allow-lists and MIME parsing run on the platform, avoiding raw worker size and loop traps.
Per-domain outbound channels: Send via Flowmails’ managed relay or bring your own account per domain (Cloudflare Email Sending via short-lived OAuth, Resend, or Brevo), letting you migrate domain-by-domain with zero global lock-in.
Unified agent & webhook surface: Connect via @flowmails/flowmails-sdk, REST, the hosted MCP server, or @flowmails/cli using domain-scoped keys. Outbound webhooks emit message.received, message.sent, and wait.resolved signed with X-Flowmails-Signature across 5 attempts (5m, 30m, 2h, 6h, 24h), while fm.messages.status(id) reports send outcomes cleanly.
Practical answers to the edge cases engineers hit right before or after a Resend cutover.
Q: How long should you run Resend in parallel before cutting over 100% of traffic?
Run a 5 to 7 day dual-run window on production traffic. That gives Gmail, Outlook, and corporate gateways enough volume to warm the new sending path while catching template edge cases and 4xx deferrals behind a feature flag.
Q: How do you migrate a Resend suppression list to a new provider?
Export every hard-bounced and complained address from Resend before cutover, store them in your application database or target relay list, and filter every outbound send job against that local list before calling the new API.
Q: What changes for webhooks if the target platform has no email.bounced hook?
Decouple send acceptance from delivery state. For platforms that emit message.sent and message.received without bounce webhooks (such as Flowmails), poll fm.messages.status(id) or consume DSNs at the underlying relay rather than blocking order or auth workflows on a missing event.
Q: Should you delete Resend DNS records immediately after switching outbound relays?
No. Keep the legacy DKIM selector in place until in-flight queues drain and legacy bounce webhooks stop arriving, typically 48 to 72 hours after 100% cutover, then remove the stale TXT and SPF includes together.
Audit your domain’s MX, SPF, DMARC, and DKIM before you touch a single record.