Mailgun vs Resend for transactional email: free plan and API
Pick Resend if you are starting a new app and want a small API and a free tier. Pick Mailgun if you run Ghost with native bulk newsletters or already have a working integration. Neither fixes broken SPF or DKIM. Check each vendor's pricing page before deciding, because plans change.
Sohail Hussain9 min readShort answer
- Pick Resend if you are starting a new app and want a small JSON API, SDKs and a free tier to begin on. Pick Mailgun if you run Ghost with native bulk newsletter sending, or if you already have an integration that works.
- Most people in the community threads behind this comparison moved away from Mailgun after losing a free plan, not because one vendor delivers better. Neither vendor fixes a domain with broken SPF or DKIM.
- Confirm current plan limits and prices on each vendor's pricing page before you decide; they change often.
You have a small app, a Ghost blog or a side project that sends password resets and receipts. Your free plan shrank or vanished, and now you are asking which to use: Mailgun or Resend?
Users on developer forums report this pattern repeatedly: a modest volume sent for free, a free tier that changed, and a scramble for somewhere else to go. Resend came up most often among people leaving Mailgun. That is a pricing story first and an engineering story second, so this comparison covers both.
Pricing and limits change often, so this page gives no plan numbers. As of November 2026, check each vendor's pricing page for current figures.
Mailgun vs Resend at a glance
| Mailgun | Resend | |
|---|---|---|
| Free tier | Users report it was removed or reduced; check current plan | Check current plan for limits |
| API style | REST plus SMTP; sending domain in the URL path, basic auth with api as username | REST plus SMTP; Bearer token, JSON body |
| SDKs | Check the docs for your language | Check the docs for your language |
| Ghost newsletters (bulk) | Native in Ghost | Not native, as far as I know |
| Ghost transactional mail | Works over SMTP | Works over SMTP |
| EU API endpoint | Yes, api.eu.mailgun.net | Check current docs |
| Best for | Established apps, Ghost newsletters | New projects, small teams, templates written as code |
Why people are comparing them now
The trigger is the free plan. When a vendor trims or removes a free tier, a project that cost nothing suddenly has a bill, and the owner starts shopping. That is a reasonable reaction, but it deserves a plan rather than a panic migration.
If you send very little mail, the free tier of whichever vendor offers one is the right choice. It can change again, though, so keep your sending code behind a thin wrapper (one function that takes recipient, subject and body). Then a provider swap takes an afternoon, not a week.
If you will pay anyway, compare paid tiers at your real monthly volume. Also check what happens at the cap: some plans block sends, others bill overage. I'd read that line before the headline price, because a blocked password reset is worse than a slightly higher invoice.
API ergonomics
Here is the same message on each. Mailgun puts your sending domain in the URL and uses form fields:
curl -s --user 'api:YOUR_MAILGUN_KEY' \
https://api.mailgun.net/v3/example.com/messages \
-F from='App <noreply@example.com>' \
-F to='user@example.org' \
-F subject='Your login link' \
-F text='Click to sign in.'
Accounts in Mailgun's EU region use api.eu.mailgun.net instead. Resend takes JSON with a Bearer token:
curl -s https://api.resend.com/emails \
-H 'Authorization: Bearer YOUR_RESEND_KEY' \
-H 'Content-Type: application/json' \
-d '{
"from": "App <noreply@example.com>",
"to": ["user@example.org"],
"subject": "Your login link",
"text": "Click to sign in."
}'
Resend's request is easier to read and easier to generate from an SDK. Mailgun's is more verbose, but it has been stable for years and is documented everywhere, which matters when you are debugging at midnight. If your templates live in plain HTML or a server-side template engine, the difference mostly disappears.
Two practical points apply to both:
- Verify the signature on every webhook (delivery, bounce, complaint) before trusting it. Check each vendor's docs for the exact scheme.
- Store the message ID the API returns. It is the fastest way to trace a missing email in the vendor's logs.
SMTP and Ghost
This is the section generic comparison pages skip. Ghost supports Mailgun natively for bulk newsletter delivery, and I know of no native Resend option for that. If you send Ghost newsletters to a member list, Mailgun is the path of least resistance.
Ghost also sends its own transactional mail: staff invites, password resets and member sign-in links. That goes through a separate mail setting, and any SMTP provider can work there, including Resend. In Ghost's configuration file, the mail block takes SMTP details:
"mail": {
"transport": "SMTP",
"options": {
"host": "smtp.resend.com",
"port": 465,
"secure": true,
"auth": {
"user": "resend",
"pass": "YOUR_RESEND_KEY"
}
}
}
For Mailgun, the host is smtp.mailgun.org, port 587, and the username is a postmaster@ address on your sending domain, with the SMTP password from the Mailgun dashboard. Verify these against each vendor's current documentation before you paste them.
Ghost newsletters are not a drop-in
Using Resend for Ghost's transactional mail is fine. Replacing Mailgun for Ghost's bulk newsletter sending is a different feature and, as far as I know, not supported natively.
Deliverability is mostly your domain
Users in community threads regularly report transactional mail landing in spam after a provider change. When password resets land in spam, the cause is usually on your side: SPF or DKIM not aligned with the From domain, no DMARC policy, a new domain with no history, or a body that reads like marketing. Both vendors give you DNS records to publish. Publish them, send a real message, and check it with the email header analyzer to confirm SPF, DKIM and DMARC pass and align.
Our SPF, DKIM and DMARC setup guide covers the records. One rule bites during migrations: a domain can have only one SPF record. If you add a second v=spf1 TXT record for the new vendor, SPF fails with a permanent error. Merge the includes into one record, or send from a subdomain with its own record. The SPF generator helps with the merge.
Also keep transactional and marketing mail apart. Separate subdomains protect your password-reset reputation from newsletter complaints; see transactional vs marketing emails.
Which causes lead to which symptom
| Symptom after switching | Likely cause | Fix |
|---|---|---|
| Mail goes to spam | SPF or DKIM not aligned with From domain | Publish the vendor's records, recheck headers |
| SPF permerror | Two v=spf1 records | Merge into one record |
| 401 from the API | Wrong auth style (basic vs Bearer) or wrong region host | Match the vendor's scheme and endpoint |
| Bounced addresses keep getting mail | Suppression list not migrated | Export and block them in your app |
| Ghost newsletters stop | Mailgun was the native bulk provider | Keep Mailgun for newsletters |
Moving from Mailgun to Resend
- Add your domain in Resend and publish the DNS records it gives you. Do this before touching code; propagation can take from minutes to a day.
- Keep Mailgun running. Send test messages from Resend to your own inboxes and check the headers for
dkim=passandspf=pass. - Swap the sending call behind a wrapper, and move one low-risk message type first (a welcome email, not a password reset).
- Rebuild bounce and complaint handling. Your suppression list does not move on its own, so export hard bounces and complaints from Mailgun and block them in your app.
- Point webhooks at your handler, verify signatures, and watch for a week.
- Remove Mailgun's DNS records and API keys once traffic is gone.
If you send from a fresh domain or subdomain, ramp up gradually; do not move 100% of volume on day one.
Checklist before you cut over
- New domain verified in Resend, DNS published
- One SPF record only, covering every sender
- Test message shows DKIM, SPF and DMARC passing
- Webhook endpoint verifies signatures
- Suppression list exported from Mailgun
- Sending code behind a wrapper so you can roll back
Should you switch at all?
If Mailgun works, you are within budget and your sending is steady, don't switch for the sake of it. Mailgun has a long track record, an EU API endpoint and native Ghost support. Switch if losing the free tier makes the project cost more than it earns, or if you are starting fresh and the Resend API fits how you work.
Resend suits small teams that want a compact API and templates in code. Mailgun suits established apps and anyone whose Ghost newsletters already depend on it. Where the two tie is deliverability: it comes down to your DNS and your content, not the logo on the relay.
If nothing works
If mail still fails after DNS and headers check out, contact the vendor's support with evidence. Include the message ID, timestamps in UTC, the sending domain, the full bounce or API error text, and what you already tried.
Subject: Transactional mail from {your-domain} failing after migration
Hello,
Since {date, UTC} messages sent from {your-domain} via your API
are [bouncing / landing in spam / returning error {exact error text}].
Example message ID: {message-id}
Recipient domain: {recipient-domain}
SPF, DKIM and DMARC: [pass / fail, paste the Authentication-Results header]
Already tried: DNS recheck, single SPF record, test to a second mailbox.
Can you check the delivery log for this message and tell me what
the receiving server returned?
Thanks,
{name}
Common questions
Does Resend replace Mailgun for Ghost newsletters?
Not as a drop-in, as far as I know. Ghost supports Mailgun natively for bulk newsletters; Resend works for Ghost's transactional mail over SMTP.
Will switching providers fix spam-folder delivery?
Rarely on its own. Authentication alignment, domain age and message content decide placement more than the vendor does.
Do my bounces and suppressions move automatically?
No. Export hard bounces and complaints from Mailgun and block them in your app or in Resend before you send.
Which free tier is better?
Neither is safe to assume. Free tiers change, so check both pricing pages and design your code so you can move again.
Explore: Email Marketing Strategy
Related Articles
SES sandbox request denied: get production access or switch
If AWS denied your SES production access request with a vague "security reasons" reply, answer the same support case with specifics: where addresses come from, how bounces and complaints are handled, and how people opt out. If it is denied again, Mailgun, Postmark and Resend are the usual alternatives.
ACS Email retirement: alternatives for sending email from Azure
If you send from Azure through Azure Communication Services Email and it is being retired, you can move to SendGrid, Mailgun, Brevo, SocketLabs or Microsoft Graph. Keep the provider key in Key Vault, publish new DNS records before cutover, and shift traffic in stages while you watch bounces.
Forgot DMARC switching Brevo to Resend? Gmail spam recovery
A DMARC gap of a few days rarely sends mail to Gmail spam by itself. Re-publish the record, then open a delivered message and confirm spf=pass, dkim=pass and dmarc=pass with alignment. If they pass, the cause is the new sender's reputation, which you rebuild with small sends to engaged recipients.
Hetzner mail all going to spam: alternatives with SMTP and Mailgun
If all mail from your Hetzner web package lands in spam, the shared IP's reputation is often the cause, and hundreds of mails from a small mail server rarely work even on a clean IP. Check the IP first, then move bulk and automated sending to a service such as Mailgun, Brevo, Amazon SES or Postmark.
Ready to supercharge your email marketing?
Start sending smarter emails with AI-powered campaigns. No credit card required.
Get Started Free