Pick SendGrid if your team needs marketing automation alongside transactional email, or wants one vendor for both API sends and campaigns. Pick Mailgun if you want a leaner developer-focused API, built-in inbound routing, or an EU sending region on a mid-priced plan. Neither is universally better. The decision turns on volume, where your users are, and whether you need automation tools in the same product.
The table below covers the dimensions that change the decision. Every price and limit was checked against the vendors’ own pricing pages and documentation on 29 September 2026.
| Dimension | SendGrid | Mailgun |
|---|---|---|
| Free option | 60-day trial, 100 emails/day (no permanent free plan) | Permanent Free plan, 100 emails/day |
| Entry paid plan | Essentials 50K: $19.95/mo | Basic 10K: $15/mo |
| 100K emails/month | Essentials 100K: $34.95/mo (shared IPs) or Pro 100K: $89.95/mo | Scale: $90/mo |
| Dedicated IP | Pro and Premier | Scale |
| EU sending region | Pro, Premier and Custom | Foundation and above |
| Log retention (entry / top) | 3 days on Essentials / 7 days on Pro | 1 day on Basic / 30 days on Scale |
| Email validation | 2,500 free on Pro | 5,000 free on Foundation and Scale |
| Inbound email routing | Inbound Parse webhook | Routes on all plans (1 on Free, 5 on Basic, full on Foundation and up) |
| Marketing automation | Yes, separate product from $15/mo (Basic) or $60/mo (Advanced) | No |
Sources: SendGrid Email API pricing, SendGrid Marketing Campaigns pricing, Mailgun pricing.
Choose SendGrid if:
- You need campaigns, segmentation and behavioral triggers next to transactional sending, and you accept two products with two bills.
- You already run on Twilio and want consolidated billing and support.
- You send 100,000 emails a month or less and can live with shared IPs on Essentials at $34.95, the cheapest paid route at that volume.
- You value a large documentation base and community for edge cases.
Choose Mailgun if:
- You need an EU sending region without going to a Pro-tier plan.
- Your app receives email as well as sending it, so inbound routing matters.
- You want email validation included from the Foundation plan.
- You are under 10,000 emails a month and want a $15 entry price plus a permanent free plan for development.
Neither may fit if you want lifecycle automation and transactional email tightly integrated. In that case, compare transactional email services that offer both natively.
How They Position Themselves
Twilio SendGrid is a full-stack email platform. The Email API handles transactional sends; Marketing Campaigns handles list management, segmentation and broadcast emails. These are separate products with separate billing, which matters when you budget. Twilio’s own FAQ says so directly: “If you want to use Marketing Campaigns and the Email API, you will need to purchase the email plans separately.”
Mailgun (owned by Sinch since 2021) stays focused on API-driven transactional and programmatic email. It has no comparable marketing campaigns suite. What it offers is inbound routing, email validation and a regional EU infrastructure, all inside the core product.
That split shapes every other comparison below.
Pricing Structure
SendGrid Email API
SendGrid no longer has a permanent free plan. New accounts get a 60-day trial: per SendGrid’s support documentation, “The Free Trial plan covers storage of 100 contacts and sending 100 emails each day for 60 days.” After that you pay:
| Plan | Volume tiers | Price |
|---|---|---|
| Essentials | 50K / 100K emails per month | $19.95 / $34.95 per month |
| Pro | 100K, 300K, 700K, 1.5M, 2.5M | $89.95 / $249 / $499 / $799 / $1,099 per month |
| Premier | Custom | Custom |
Dedicated IPs come with Pro and Premier; Essentials runs on shared infrastructure. Overage is billed per email: $0.0009 on Essentials 100K, $0.0011 on Pro 100K, and $0.0009 on Pro 300K. Marketing Campaigns is a different product: Basic starts at $15/month and Advanced at $60/month, priced by contact storage and send volume.
Mailgun
Mailgun’s plans are tiered by volume:
| Plan | Price | Included emails | Overage per 1,000 | Log retention | Dedicated IP |
|---|---|---|---|---|---|
| Free | $0 | 100/day | n/a | 1 day | No |
| Basic | from $15/mo | 10,000 | from $1.80 | 1 day | No |
| Foundation | $35/mo (first month free) | 50,000 | from $1.30 | 5 days | No |
| Scale | $90/mo (first month free) | 100,000 | from $1.10 | 30 days | 1 included |
The Free plan has no expiry, so it works for development and low-volume testing. The pricing page no longer lists a pay-as-you-go plan; beyond Scale you pick a higher volume tier or talk to sales.
What each costs at real volumes
| Emails per month | SendGrid | Mailgun |
|---|---|---|
| 10,000 | $19.95 (Essentials 50K, smallest paid tier) | $15 (Basic) |
| 50,000 | $19.95 (Essentials 50K) | $35 (Foundation) |
| 100,000 | $34.95 (Essentials 100K, shared IPs) or $89.95 (Pro 100K, dedicated IP) | $90 (Scale) |
| 500,000 | About $429 (Pro 300K at $249 plus 200,000 extra emails at $0.0009), or $499 for the Pro 700K tier | About $530 (Scale at $90 plus 400,000 extra emails at the listed “from $1.10” per 1,000) |
The 500,000 row is an estimate built from the published overage rates, not a quoted price. Mailgun’s volume selector goes up to 500,000 and beyond, so its actual quote may differ; SendGrid’s Pro 700K tier is the flat-price alternative. Both figures exclude taxes, add-ons and any Marketing Campaigns subscription.
Pricing verdict
Mailgun is cheaper below 10,000 emails a month. From 10,000 to 100,000 emails a month, SendGrid Essentials is cheaper, with the trade-off that you stay on shared IPs, three days of activity history and no included validation. If you want a dedicated IP at 100,000 emails, the two land at near parity: SendGrid Pro at $89.95 and Mailgun Scale at $90. Add a marketing automation requirement and SendGrid’s total rises, since Marketing Campaigns is billed on top.
Deliverability and Reputation Tooling
Both platforms can achieve strong deliverability when authentication (SPF, DKIM, DMARC) is configured correctly and list hygiene is maintained. Vendor-level infrastructure differences are smaller than most marketing comparisons claim.
Dedicated IPs. SendGrid puts dedicated IPs on Pro ($89.95/month minimum) and Premier. Mailgun includes one on Scale ($90/month). The cost threshold is nearly identical. Both require IP warmup, which you manage.
Email validation. Mailgun lists 5,000 email validations included on Foundation and Scale. SendGrid includes 2,500 free validations on Pro and 5,000 on Premier, and nothing on Essentials. For teams with high list churn or user-generated sign-ups, built-in validation is a real operational difference.
Shared infrastructure risk. On Essentials or Mailgun’s Basic and Foundation plans, you share IP pools with other senders. In Mailtrap’s inbox placement test, run with “a free subscription, shared IPs, identical email templates, and seed testing”, SendGrid landed 61.0% in the inbox and Mailgun 71.4% (Mailtrap). Mailtrap sells a competing email API and the test used free-tier shared IPs, so treat the numbers as directional, not definitive.
API and SDK Quality
Both platforms offer REST APIs and SMTP relay. The difference is surface area and developer ergonomics.
SendGrid provides official SDKs for Python, Node.js, Ruby, PHP, Java, C#, Go, and Perl. The API covers transactional sends, template management, suppression lists, bounces and stats. The JavaScript SDK has drawn criticism for pre-TypeScript patterns and loose typing compared with newer alternatives. Documentation is thorough and benefits from Twilio’s investment, with a large community.
Mailgun provides official SDKs for Python, Node.js, Ruby, PHP, Java, C#, and Go. The API covers transactional sends, inbound routing (catch-all or regex-based route matching to forward or store messages), email validation, and template management. Inbound routing lets you receive email at a domain and forward it to an HTTP endpoint, so Mailgun works as both an outbound and inbound processing layer. SendGrid can receive email too, through its Inbound Parse webhook.
Authentication setup is procedurally similar on both: DNS records for DKIM and SPF, plus an optional DMARC policy. Mailgun walks you through domain setup per region (US or EU); SendGrid’s domain authentication wizard is well documented in the Twilio docs.
Analytics and Log Retention
When you debug a deliverability issue days after it happened, event log depth matters. It is worth checking before you commit.
| Plan level | SendGrid | Mailgun |
|---|---|---|
| Entry plan | 3 days (Essentials) | 1 day (Basic) |
| Mid-tier | 7 days (Pro) | 5 days (Foundation) |
| Top self-serve | 7 days (Pro), more available for purchase | 30 days (Scale, included) |
SendGrid lists additional Email Activity History as an add-on you can purchase, so longer retention costs extra. Mailgun’s 30 days come with the $90 Scale plan. Both platforms expose delivery, bounce, open, click and spam-complaint events via webhooks.
EU Data Residency
Both vendors offer an EU sending region, but on different plans: Mailgun from Foundation ($35/month) and SendGrid only on Pro, Premier and Custom plans ($89.95/month and up). For a team sending transactional email to users in Germany, Spain or elsewhere in the EU, that makes Mailgun the cheaper route to keeping message data inside the EU.
Mailgun states that “EU regional support is available on the Foundation, Growth, Scale and Custom plans” (Mailgun). You provision an EU sending domain in the same account, use the EU endpoint (api.eu.mailgun.net), and message data stays in the region where it is processed. Mailgun’s launch post lists messages, event logs, suppressions, routes and statistics among the data processed in the EU region, and EU and US domains can live in one account.
SendGrid‘s docs say “Pro, Premier, and Custom plan accounts” can use EU Data Residency for Email, and that “Twilio stores that data in the EU and processes it whenever possible within the EU” (SendGrid FAQ). Setup uses a regional subuser and the EU API base URL. Essentials accounts cannot use it.
Data residency is not the same as GDPR compliance. You still need a data processing agreement, a lawful basis for each send, and correct handling of consent and unsubscribes. The region only answers where the data sits.
Marketing Automation and Lifecycle Features
This is one of the starkest differences.
SendGrid’s Marketing Campaigns includes audience segmentation, automation, A/B testing and a drag-and-drop editor. It is a legitimate marketing automation tool, not just a broadcast sender. The limitation is that it is a separate product with its own interface and billing: Basic from $15/month, Advanced from $60/month.
Mailgun has no comparable product. For onboarding sequences, behavioral triggers or lifecycle flows, the logic lives in your application or in a connected tool. Mailgun is the send infrastructure layer.
For API-driven transactional email only, this is irrelevant. For teams that want transactional and lifecycle sends in one platform, Mailgun needs a second tool, and SendGrid provides it across two billing lines.
Support
Mailgun lists ticket support on Free, Basic and Foundation, and “Live phone & chat support” on Scale. On SendGrid’s pricing page, personalized support and expert services are listed as purchasable add-ons; otherwise you rely on documentation, the community and tickets. Twilio’s docs are extensive enough that most issues have a searchable answer.
Neither platform offers strong support at entry-level pricing. If support SLAs matter, plan for a higher tier or an add-on.
For a reality check against day-to-day experience, see what Reddit users say about Mailgun vs SendGrid.
Other Options to Consider
If neither maps cleanly to your requirements, three alternatives come up most often:
- Amazon SES has the lowest cost at scale if you already run on AWS. See Amazon SES alternatives for the trade-offs.
- Resend is the modern, TypeScript-first option. See Resend vs SendGrid.
- Postmark has a strong transactional deliverability reputation. See Postmark vs SendGrid.
The broader lists are in SendGrid alternatives and Mailgun alternatives.
FAQ
Is Mailgun cheaper than SendGrid?
It depends on volume. At 10,000 emails a month Mailgun Basic ($15) beats SendGrid Essentials ($19.95). At 50,000 SendGrid Essentials ($19.95) beats Mailgun Foundation ($35), and at 100,000 Essentials 100K ($34.95) beats Mailgun Scale ($90), though Essentials has shared IPs only. With a dedicated IP at 100,000 emails, SendGrid Pro ($89.95) and Mailgun Scale ($90) are effectively tied. Marketing Campaigns is billed separately on SendGrid.
Does SendGrid still have a free plan?
Not a permanent one. New accounts get a 60-day free trial with 100 emails per day, and you must upgrade to a paid plan afterward to keep sending. Mailgun still has a Free plan with 100 emails per day and no expiry, which suits development and testing.
Which has better deliverability: SendGrid or Mailgun?
Both deliver well when SPF, DKIM and DMARC are configured and your list is clean. Sender behavior outweighs vendor differences. In Mailtrap’s shared-IP test, Mailgun placed 71.4% in the inbox against 61.0% for SendGrid, but that test was run by a competitor on free tiers, so use it as a directional signal only.
Which is better for transactional email in the EU (Germany, Spain)?
Mailgun is the cheaper way to get an EU sending region, since it is available from the Foundation plan at $35/month. SendGrid offers EU Data Residency only on Pro, Premier and Custom plans. Either way, you still need GDPR basics such as a data processing agreement and consent handling.
Is Mailgun better for developers?
Mailgun is narrower in scope, which can feel more focused. It has flexible inbound routing and an EU endpoint built in. SendGrid has more extensive documentation and a larger community, which helps when you hit edge cases. SDK coverage across major languages is comparable.
Does Mailgun have marketing automation?
No. Mailgun is a transactional and programmatic email API without campaigns, behavioral automation or a visual email builder. For lifecycle automation you build the logic in your application or connect a separate tool.
Can I switch from SendGrid to Mailgun (or vice versa)?
Yes. Both support standard SMTP relay alongside their REST APIs. The main work is re-authenticating your sending domain (DKIM, SPF), moving stored templates, updating API client code and rerouting webhook endpoints. Neither locks you into a proprietary format that prevents switching.
I’ve spent my career building software at scale with a soft spot for email: deliverability, lifecycle campaigns, and getting messages to actually land. I started Coldletter to fix what bugged me about transactional and marketing email tools. I’m based in Vancouver.
