Who Mailgun is
Mailgun is an email API for developers, founded in 2010 and today part of Sinch. Beyond sending, it covers receiving and tracking email, deliverability tools, address validation and previews of a message before it goes out.
It runs separate US and EU regions, and message data stays in the region where it is processed, which matters to companies writing to European customers. That is why it is one of the email providers our notifications module connects to.
What it does in your platform
Notifications
Sends the platform's email from your own domain, in Mailgun's EU region when your customers are in Europe: receipts, security alerts, statements and, for customers who opted in, campaigns. Deliveries, failures, opens and complaints come back as signed webhooks, so every message is tracked.
How the connection works
One connector in the notifications module talks to Mailgun's REST API, at the EU or US address of the region your domain lives in. Your apps never hold the API key.
A KYC check is approved
The module picks the welcome template your team edited in the backoffice, in the customer's language.
Mailgun accepts it
The module sends it through Mailgun's API from your verified domain, and Mailgun queues it for delivery.
It is delivered
Mailgun hands the message to the customer's mail server, retries temporary failures and records the outcome.
A signed webhook reports back
Every event, from delivered to complained, comes with a token, a timestamp and an HMAC signature made with your webhook signing key.
The module checks it
It verifies the signature and updates the message's status in the backoffice, so your team sees what reached the customer.
Another route for alerts
If a security alert fails for good, the module sends it again by SMS or push.
Next to other providers
Running two email providers is a matter of configuration: Mailgun can send everything while another provider stands by for the security alerts that cannot be missed, or the other way round.
Your templates and your customers' preferences live in the platform, not in Mailgun. Changing provider later does not touch your apps, and your delivery history stays in your records.
When Mailgun fits best
A strong fit when
- You want email for European customers sent and processed in the EU.
- You want every webhook signed, with replayed calls easy to spot.
- You send account email and campaigns, and want both tracked the same way.
Also worth a look
- Postmark, when you want a service built around transactional email.
- A provider your team already uses: its account becomes a connector too.
How we get you live
The contract
We help you get your Mailgun account and contract in place, with your sending domains in the region that suits your customers.
Your domain
We add and verify your sending domain with you, in the EU or US region, with the DNS records for DKIM and tracking.
The keys
The API key and the webhook signing key go into your platform's secrets and nowhere else, so every event is proven to come from Mailgun.
A full test run
Messages go first through Mailgun's test mode, which accepts them without sending, and a sandbox domain that only sends to your team, before your first customer email.
