Mailgun
Free planEmail API and SMTP relay that developers use to send, receive and track email from their own apps.
Best for developers who send receipts, alerts and password resets from their own app and need to receive email too
Facts checked November 4, 2026 · First written by Mutuo Mbilla
The short answer
Mailgun suits a product team that wants email inside its software: an HTTP API and SMTP relay, inbound routing that posts replies to your app, and event logs and webhooks for every delivery, bounce and click. It adds send-time optimization, US or EU sending domains and subaccounts for separate brands or clients. Paid plans start at $15 a month for 10,000 emails, but log retention is one day on Free and Basic, so most production apps will want Foundation at $35. It is a developer tool first, so a marketer who wants to build newsletters without code will be happier with its sister product, Mailjet.
Choose it if
- Your app sends order confirmations, password resets or alerts and you want them sent through an API or SMTP with full delivery logs
- You need to receive email too, for example posting customer replies to your app's webhook or forwarding them to a team address
- You want your sending domains and data in the EU region, which Mailgun lets you pick per domain
- You run email for several brands or clients and want each in its own subaccount with separate domains, IPs and API keys
- Your developers work in Go, Node.js, PHP, Java, Ruby or Python and want an official SDK
Skip it if
- Nobody on your team writes code or edits DNS records; Mailgun's setup assumes both
- You want a drag-and-drop newsletter builder, sign-up forms and marketing automations; Mailjet or MailerLite suit that better
- You need more than 100 emails a day for free, or more than one user, since the free plan allows neither
- You need logs kept longer than a day without paying $35 a month: Free and Basic keep one day, Foundation five and Scale 30
- You want cold sales sequences sent from your own inbox, with follow-ups that stop when someone replies; a sales engagement tool suits that better
Main features
Email API and SMTP relay
Send through the HTTP API, which builds the MIME message for you, or point your app's SMTP settings at Mailgun. If your network blocks port 25, you can use port 587 or 2525.
Inbound routing
Mailgun can receive email for your domain and, by rules you set, forward it, POST it to your app's URL or store it for you to fetch later. Support desks and reply-by-email features are built this way.
Event logs and webhooks
Every message produces events such as accepted, delivered, failed, opened, clicked, unsubscribed and complained. You read them in the control panel or the Logs API, or receive them by webhook, and Mailgun keeps event data for 30 days, with access depending on your plan.
Stored templates
Save up to 100 templates with 40 versions each at account level, or per sending domain, and send by template name or ID with your own variables. You can build them in the Template Builder or through the API.
Send-time and time zone optimization
Send Time Optimization holds a message for up to 72 hours and delivers it when that recipient usually opens and clicks. Time Zone Optimization delivers at a set local time, using time zones from past click locations.
Scheduled sending
Set a delivery time on any message through the API or an SMTP header. Plans with seven or more days of storage can schedule up to seven days ahead.
Subaccounts
Create linked accounts with their own sending domains, IPs, API keys and users, while usage rolls up to the main bill. Agencies and companies with several brands use them to keep reputations apart.
US or EU domains
Pick the region for each sending domain. Regions are kept apart, so templates and settings have to be created in each region you use.
Mailgun Optimize and Validate
Separate deliverability tools for inbox placement tests, blocklist and spam trap monitoring and email previews, plus single and bulk address validation before you send.
MCP server
An open-source MCP server, run on your own machine, lets Claude, Cursor and other assistants send email, check delivery stats and troubleshoot DNS through more than 50 Mailgun operations.
Pricing
US dollar prices checked November 4, 2026, on Mailgun's pricing page, for its Send plans billed monthly. Prices shown are starting prices for each plan's included volume; overage rates fall as volume rises. Mailgun's FAQ says one dedicated IP is included with the 100,000-email tier and extra IPs cost $59 an IP a month. Its docs note that messages sent in test mode are charged, and that subaccount usage is billed to the main account. Mailgun Optimize and Validate are priced separately.
Free
$0
100 emails a day, 1 custom sending domain, 1 user, 1 inbound route, 1 day of logs, ticket support
Basic
$15 / month
10,000 emails a month, then from $1.80 per 1,000; 1 custom sending domain, 5 inbound routes, 1 day of logs
Foundation
$35 / month, first month free
50,000 emails a month, then from $1.30 per 1,000; 1,000 sending domains, unlimited users, full inbound routing, 5 days of logs
Scale
$90 / month, first month free
100,000 emails a month, then from $1.10 per 1,000; everything in Foundation plus 30 days of logs, dedicated IP pools and live phone and chat support
Enterprise
Custom / month
Everything in Scale plus custom features, priced by quote
Reviews
Write a reviewNo reviews yet. If you use Mailgun, yours would be the first.
Alternatives to Mailgun
Questions people ask
Is Mailgun free?
Yes, for small volumes. The free plan sends 100 emails a day with one custom sending domain, one user and one inbound route, and keeps logs for one day. Basic starts at $15 a month for 10,000 emails, and Foundation and Scale give you the first month free (checked November 4, 2026).
What is the difference between Mailgun and Mailjet?
Both belong to Sinch, and the same terms of service cover Mailgun Technologies, Inc. and the Mailjet companies. Mailgun is built for developers who send email from their own code. Mailjet adds a drag-and-drop editor, contact lists and campaigns for marketers, with an API on every plan.
Do I need a dedicated IP address with Mailgun?
Mailgun's own guidance is that a shared IP usually suits senders under about 5,000 emails a day, and a dedicated IP makes sense above roughly 50,000 a week. Low or very uneven volume makes it hard to build a reputation on a dedicated IP. You add one from IP Management in the control panel after adding a card.
Can Mailgun receive emails?
Yes. You set routes that match incoming messages and then forward them, POST them to your app or store them for later retrieval. A sandbox domain is limited to one route.
Which programming languages does Mailgun support?
Mailgun publishes official SDKs for Go, Node.js, PHP, Java, Ruby and Python. Any language that can make HTTP requests or speak SMTP can use it too.
Does Mailgun charge for test emails?
Yes. Test mode accepts a message without delivering it, and Mailgun's docs say those messages are still charged. Use a sandbox domain and authorized recipients if you want to test without using your allowance.
Sources we checked 20
- mailgun.com/pricing for plan prices, included emails, overage rates, free plan limits, one-month free trials, log retention, domains, users, inbound routes, support on Free and Scale, dedicated IP price (read by the editor) checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/get-started for feature overview, US or EU domains, inbound parsing, tracking, IP pools, suppression management checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/user-manual/domains/domains-sandbox for sandbox domain, 5 authorized recipients, one route checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/faq/faqs for free accounts cannot add custom domains, 1,000 domains on paid plans, dedicated IP guidance checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/faq/sending for HTTP API versus SMTP, ports 587 and 2525 checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/user-manual/events/events for event types, 30-day event retention, access by plan checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/send-templates for 100 templates, 40 versions, account and domain templates, regions checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/send-sto for Send Time Optimization and 72-hour window checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/send-tzo for Time Zone Optimization checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/schedule-delivery for scheduled delivery up to 7 days checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/test-mode for test mode messages are charged checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/user-manual/receive-forward-store/receive-forward-store for inbound forwarding, webhooks and storage checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/user-manual/subaccounts/subaccounts for subaccounts and billing roll-up checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/sdk/introduction for official SDK languages checked November 4, 2026
- documentation.mailgun.com/docs/mailgun/mcp for MCP server, local only, 50+ operations checked November 4, 2026
- documentation.mailgun.com/docs/inboxready/intro-ir for Mailgun Optimize, formerly InboxReady checked November 4, 2026
- mailjet.com/legal/terms for contracting entity Mailgun Technologies, Inc. and Sinch as provider checked November 4, 2026
- twilio.com/en-us/sendgrid for SendGrid alternative: Email API, Marketing Campaigns, free trial without card checked November 4, 2026
- postmarkapp.com/pricing for Postmark alternative: $15 Basic plan, separate message streams checked November 4, 2026
- aws.amazon.com/ses/pricing for Amazon SES alternative: $0.10 per 1,000 emails checked November 4, 2026

