Migration guide
Mailgun → Resend
Mailgun and Resend both ship a transactional-email API, but they target different eras of developer tooling. Mailgun (owned by Sinch since 2021) prices Foundation at $35/mo for 50,000 emails with $1.30 per-1,000 overage; Resend Pro 50k is $20/mo with $0.90 per-1,000 overage. At 100k volume, Mailgun Scale is $90/mo (with dedicated IP and SAML included); Resend Pro 100k is $35/mo without those add-ons but with React Email, batch sending, and the Marketing track sitting next door. The migration pencils on cost in the 10k-to-500k range and on developer experience at any volume; it does not pencil if SAML on a self-serve plan or 30-day log retention or Mailgun's mature deliverability tooling is load-bearing.
Published · By the TierGauge editorial team
When this migration makes sense
- You send between 10,000 and 500,000 transactional emails per month and Mailgun's Basic / Foundation / Scale ladder is now the dominant invoice line item. Resend Pro 50k at $20 or Pro 100k at $35 collapses two of those tiers' cost into one cheaper plan.
- Your team writes email templates in React (or wants to). Resend's React Email integration is a real workflow upgrade over Mailgun's template-builder approach or raw-HTML-via-API.
- You want one vendor for transactional plus marketing email. Resend's Marketing track ($40 to $650 per month for 5k to 150k contacts) sits next to the transactional API; Mailgun is transactional-only and you'd pair it with Mailchimp or Kit for broadcasts.
- You value modern API ergonomics: native batch sending, Bearer-token auth, JSON payloads, official SDKs across most major languages. Mailgun's domain-scoped form-encoded endpoints feel like the last-decade standard.
- Your deliverability needs are normal SaaS-grade (signup confirmations, password resets, receipts). Mailgun's IP-warmup and dedicated-IP infrastructure are mature, but Resend handles standard SaaS volume cleanly and the deliverability gap doesn't matter at typical product-engineering scale.
When it doesn't
- You need SAML SSO on a self-serve plan. Mailgun Scale at $90/mo includes SAML; Resend gates SAML behind Enterprise (custom contract). For security-org-required SSO, this is a blocker until you're ready for an Enterprise contract anyway.
- 30-day log retention is a compliance or debugging requirement. Mailgun Scale ships 30-day retention; Resend's retention windows are shorter on self-serve tiers. If your incident-response process depends on 4-week-old delivery logs, stay.
- Send-time optimization is a load-bearing engagement lever in your stack. Mailgun Scale ships it natively (auto-schedule sends per recipient timezone and engagement pattern); Resend doesn't ship an equivalent feature today.
- Inbound routing is a primary use case with complex pattern-matching rules. Mailgun's inbound routing has a long-running maturity advantage; Resend Inbound exists but doesn't yet match Mailgun's route-pattern flexibility.
- You're a high-volume sender (1M+ emails/month) with negotiated dedicated-IP bundles and account management. Both vendors offer Enterprise tiers, but Mailgun's Sinch parent has more mature high-volume infrastructure and contracting.
What you lose by leaving Mailgun
- Mailgun's mature deliverability infrastructure: IP-warmup tooling, dedicated-IP availability on Scale (no add-on contract needed), and a decade of inbox-placement reputation built up before the transactional-email category was crowded.
- Send-time optimization on Scale tier: auto-schedule sends per recipient timezone and engagement pattern. No equivalent on Resend today.
- 30-day log retention on Scale plan. Resend's retention windows are shorter; if your debug or compliance flow needs 4-week-old logs, you'd ladder up to Resend Enterprise.
- SAML SSO on a self-serve plan. Mailgun Scale at $90/mo includes SAML; Resend reserves SAML for Enterprise (custom contract).
- Inbound-routing maturity: Mailgun's route-pattern engine has been battle-tested for years; Resend Inbound is newer.
- Domain-scoped SMTP credentials and API keys. The per-domain isolation Mailgun ships is genuinely useful for multi-product accounts; Resend's account-scoped model trades that for simplicity.
What you gain with Resend
- Cleaner pricing at every comparable volume: Resend Pro 50k at $20 vs Mailgun Foundation at $35; Resend Pro 100k at $35 vs Mailgun Scale at $90 (Scale does include a dedicated IP, but only the small subset of senders who need one will value that bundle).
- First-class React Email integration: write email templates as React components, get JSX type-checking, share components across web and email. The headline modern-DX upgrade.
- A single vendor for transactional plus marketing email if you want it: Resend's Marketing track adds broadcasts, audiences, and contact management at $40 to $650 per month for 5k to 150k contacts. Skip the separate Mailchimp / Kit bill.
- Native batch sending API: send up to 100 emails in one POST. Mailgun supports batch sends but the API is older-feeling.
- Cleaner pricing surface: no domain-scoped endpoint complexity, no template-builder feature gating per tier, no platform-vs-Pro feature matrix to navigate. Volume in, dollars out.
- Active product iteration: Resend ships frequently (broadcasts, audiences, AI credits, batch sending, inbound have all landed since 2023). Mailgun under Sinch is steadier and slower.
Plan mapping at the entry paid tier
The lowest non-free, non-custom tier on each side. Use this for the "if I'm on $X with Mailgun, what's the equivalent on Resend?" gut check.
| Limit | Mailgun (Basic) | Resend (Pro 50k) |
|---|---|---|
| Emails / month | 10,000 | 50,000 |
Step-by-step migration
- 01
Export your list from Mailgun
Pull a fresh CSV of every active subscriber. Capture the fields you actually use downstream: email is required, name is standard, signup date and tier (free/paid) are useful when Mailgun provides them.
- 02
Provision Resend
Sign up, set sender identity, and verify your sending domain (DKIM, SPF, DMARC). Do this before importing the list; sending from an unverified domain is the single fastest way to land in spam at the moment of cutover.
- 03
Import the list and map fields
Upload the CSV. Map email + name + any custom fields. Decide whether to import as one list or split into segments/tags. Mailgun-style organization rarely maps 1:1, so plan the split before the upload, not after.
- 04
Rebuild automations and templates
Resend's automation builder is structurally similar but won't import Mailgun's flows directly. Rebuild only what you actively use; the move is a chance to delete the unused ones rather than lift-and-shift dead infrastructure.
- 05
Send a test broadcast
Pick a small segment and send a real broadcast (not just a preview). Verify deliverability, link clicks, and unsubscribe flow. If anything's off, you find it before the announcement, not after.
- 06
Announce the move and cut over
Send your last broadcast from Mailgun announcing the new sender domain and what to expect. Cut over DNS and sending from Resend on the same day, not staggered. A dual-send week creates more confusion than it prevents.
Mailgun-to-Resend specific gotchas
Universal steps cover most of the work. These are the failure modes unique to this exact pair.
-
#1
API surface differences: Mailgun uses domain-scoped endpoints (POST /v3/{domain}/messages) with HTTP Basic auth and form-encoded payloads. Resend uses POST /emails with Bearer-token auth and JSON. The send-payload field names differ (Mailgun's from / to / subject / html / text vs Resend's identical-looking but JSON-shaped equivalents). Full SDK swap or rewrite client code; don't pattern-match line-for-line.
-
#2
Template migration: if your templates live in Mailgun's template builder, the migration is a real engineering project. Either re-author each as a React Email component (the modern-DX upgrade), or render templates server-side and POST raw HTML to Resend. The second path loses the React Email benefit but is faster.
-
#3
Inbound routing rebuild: Mailgun routes can have complex match expressions (catch_all, match_recipient regex, store-and-forward semantics). Resend Inbound's route configuration is simpler. Plan a careful inventory of every existing Mailgun route and test each equivalent Resend route in staging before flipping inbound DNS.
-
#4
Webhook payload divergence: Mailgun's webhook events (delivered / opened / clicked / unsubscribed / complained / failed / accepted / rejected) have specific JSON shapes with event-data envelope wrappers. Resend's events are flatter. Rewrite webhook handlers; don't try to translate field-by-field.
-
#5
SMTP credential model: Mailgun's SMTP credentials are domain-scoped (separate username/password per verified domain). Resend's SMTP credentials are account-scoped via API-key auth. If your application stack has per-domain SMTP credentials hardcoded, the auth model needs to change.
-
#6
DNS staggering: both use SPF and DKIM but the DNS records are vendor-specific. Add Resend's records alongside Mailgun's, verify Resend, and warm the new sender on a percentage of traffic for 7 to 14 days before flipping the API key. Don't hard-cut a production sender.
Common questions
- Is Resend cheaper than Mailgun?
- Both start at the same headline price (Free). The reason to migrate is the pricing model and feature scope, not the entry-tier number.
- Will my data transfer cleanly?
- Most transactional email data transfers, but rarely 1:1. The "Pair-specific gotchas" section above is hand-curated for this exact migration: it covers what exports from Mailgun, how it imports into Resend, and which structural pieces (workflows, integrations, custom domains) require rebuild rather than direct port. The constraint usually isn't the data export; it's the rebuild work for anything Resend models differently.
- How long does the migration take?
- A clean migration for this pair is typically 1-2 weeks of focused work: data export, integration reconnection (CRMs, webhooks, payment processors), feature rebuild for whatever doesn't port directly, test run, cutover. The constraint is rarely the export itself; it's the integration reconnection and the rebuild work for any feature that Resend models differently from Mailgun.
- Are Mailgun and Resend direct competitors?
- Yes. Both are primarily transactional email tools, which is why this is a defensible head-to-head migration rather than a cross-category consolidation.
- Where can I see Mailgun vs Resend side-by-side?
- The /compare/mailgun-vs-resend page on TierGauge shows side-by-side plans, headline pricing, included features, and limit comparison at the entry paid tier. This migration guide is the long-form decision narrative; the compare page is the data-only dashboard.
Sources
- Mailgun: https://www.mailgun.com/pricing/
- Resend: https://resend.com/pricing
Pricing verified . Migration mechanics are based on the public pricing pages and standard ESP migration patterns; verify destructive steps (DNS cutover, paid subscription transfer) against the vendor's current docs before executing.