Mailgun vs SendGrid (Twilio) comes down to free tier, price and what you optimize for. Mailgun has the more generous free tier, and the cheaper paid entry point is $15/mo. Mailgun stands out for flexible routing and inbound processing, while SendGrid (Twilio) stands out for mature feature breadth and scale.
- Mailgun free tier: 100 emails/day (~3,000/mo), 1-day log retention, 1 custom domain.
- SendGrid (Twilio) free tier: Permanent free tier discontinued on 2025-05-27. New accounts get a 60-day trial (100 emails/day) only.
- Mailgun from $15/mo; SendGrid (Twilio) from $19.95/mo.
- Mailgun for flexible routing and inbound processing; SendGrid (Twilio) for mature feature breadth and scale.
Mailgun vs SendGrid (Twilio): side by side
| Mailgun | SendGrid (Twilio) | |
|---|---|---|
| Free tier | 100 emails/day (~3,000/mo), 1-day log retention, 1 custom domain. | Permanent free tier discontinued on 2025-05-27. New accounts get a 60-day trial (100 emails/day) only. |
| Entry paid | $15/mo | $19.95/mo |
| Entry detail | Basic $15/mo (10,000), Foundation $35/mo (50,000), Scale $90/mo (100,000). | Email API Essentials from $19.95/mo (50,000 emails). Pro adds a dedicated IP at a higher tier. |
| Dedicated IP | 1 included on Foundation 100k / Scale; extra IPs $59/IP/mo | Included on Pro and above |
| Best for | Flexible routing and inbound processing | Mature feature breadth and scale |
| Watch out | Recent price increases push teams to compare | Removing the permanent free tier triggered a wave of switchers |
Mailgun and SendGrid (Twilio) take different approaches to transactional email. Mailgun is free up to 100 emails/day (~3,000/mo), then paid plans run $15/mo for 10,000, $35/mo for 50,000, and $90/mo for 100,000, with overage from $1.80 / 1k; dedicated IP: 1 included on Foundation 100k / Scale.
SendGrid (Twilio) no longer has a permanent free tier (new accounts get a 60-day trial at 100/day), then paid plans run $19.95/mo for 50,000 and $89.95/mo for 100,000; dedicated IP: Included on Pro and above. SendGrid (Twilio) is known for mature feature breadth and scale and tight Twilio ecosystem integration.
For a Next.js codebase, the choice usually comes down to free-tier headroom and developer experience versus deliverability guarantees. REST and SMTP. In Next.js, call mailgun.js from a Route Handler. If a handful of emails absolutely must reach the inbox, weight deliverability more heavily; if you want the fastest start, favor the larger free tier and the better SDK. Pricing was verified on 2026-06-04.
// app/api/send/route.ts
import { Resend } from "resend";
const resend = new Resend(process.env.RESEND_API_KEY!);
export async function POST(req: Request) {
const { to, subject, html } = await req.json();
// was: mg.messages.create(DOMAIN, { from, to, subject, html })
const { data, error } = await resend.emails.send({
from: "noreply@yourdomain.com", to, subject, html,
});
return error
? Response.json({ error }, { status: 500 })
: Response.json({ id: data?.id });
}FAQ
- Which is cheaper, Mailgun or SendGrid (Twilio)?
- At the entry tier, Mailgun is $15/mo and SendGrid (Twilio) is $19.95/mo; for low volume the one with the larger free tier (Mailgun) is effectively cheaper.
- Which has the bigger free tier, Mailgun or SendGrid (Twilio)?
- Mailgun. Mailgun: 100 emails/day (~3,000/mo), 1-day log retention, 1 custom domain. SendGrid (Twilio): Permanent free tier discontinued on 2025-05-27. New accounts get a 60-day trial (100 emails/day) only.