Migrate from Mailgun to Send & Retain
Import your suppressions, let your agent rebuild the templates, and swap Mailgun calls one email type at a time.
✓Free to start. Unlimited contacts on every tier.
Inventory before cutover
Inventory
Source material read
Rebuild
Created paused
Verify
Real inbox test
Switch
One trigger first
Destination automation
Paused until validation and explicit cutover
[ 01 / 05 ]Step by step
How do I migrate from Mailgun?
There's no Mailgun connector. Your agent works from your code and your templates, one email type at a time.
Set up your domain
Your agent creates your sending domain and hands you the DNS records to add, then verifies them and sets up a sender.
Import suppressions first
Export bounces, unsubscribes, and complaints from each domain's suppressions in Mailgun and import them as your block list before a single send.
Rebuild templates
Your agent rewrites your Mailgun templates in React Email, keeps their variables, and sends you a test of each.
Swap one call site
Move one email type to the Send & Retain API. Retry with the same Idempotency-Key and it never sends twice.
send-welcome.mjsconst response = await fetch("https://sendandretain.com/api/v1/emails", { method: "POST", headers: { Authorization: `Bearer ${process.env.AEM_KEY}`, "Content-Type": "application/json", "Idempotency-Key": `welcome-${user.id}` }, body: JSON.stringify({ to: user.email, template: "welcome" }), });Move the rest, then add automations
Once the first email delivers cleanly, move the others. Then send product events and let your agent build paused automations on top.
[ 02 / 05 ]Example prompts
What can I ask my agent to do?
Paste these into Claude Code, Cursor, or Codex inside your repo.
Inventory
“Find every Mailgun call in this repo and list each email type, its template, and its tags.”
Templates
“Rewrite our Mailgun order shipped template in React Email, render it, and send me a test.”
Swap
“Move the welcome email to the Send & Retain API with an idempotency key. Leave the rest on Mailgun.”
Webhooks
“List what our Mailgun webhook handler does, and set up a signed Send & Retain webhook to match.”
[ 03 / 05 ]Mailgun vs Send & Retain
What changes when I move from Mailgun?
Focus
Email sending infrastructure for developers
Transactional and marketing email in one system
Marketing automations
Built in your own code
Automations triggered by product events, always created paused
Contacts
Mailing lists for sending to groups
One record per person, with attributes, events, and history
Templates
Stored templates or your own HTML
React Email (TSX), versioned. Edits create drafts
Pricing
Priced on email volume
Priced on sends. Unlimited contacts on every tier
Who does the work
Developers, in code, plus an official MCP server
Your app over the API, your AI agent over MCP
[ 04 / 05 ]Do you need to move?
Should I leave Mailgun?
Only if you want more than a sending pipe. Mailgun is a solid choice if you'd rather build everything else yourself.
- Sending only transactional email and happy building the rest? Stay on Mailgun.
- Want welcome, trial, and win-back emails without writing the scheduling yourself? Send & Retain does both.
- Moving? Suppressions first, then one email type at a time.
Questions people ask us
Move one Mailgun call first.
Import your suppressions, rebuild one template, and swap one call site.