Mailgun
Mailgun’s API transport carries the raw message, so mail relayed
through Mailway reaches Mailgun byte-for-byte on either transport. Its
webhooks report what happened after the handoff — confirmed
deliveries, permanent and temporary failures, and spam complaints — which
powers the delivered state, webhooks like
mail.delivered and mail.bounced, and automatic
suppressions.
Before you start
Section titled “Before you start”- A Mailgun account with your sender domain added and verified — see Deliverability for what each record proves.
- For the API transport: an API key, the Mailgun domain you send from, and the region your account lives in (US or EU).
- For the SMTP transport: the domain’s SMTP credentials (a login and password from the domain’s SMTP settings).
Add the account in Mailway
Section titled “Add the account in Mailway”-
Add the provider.
In the console, open Providers → New provider and pick Mailgun:
- API: paste the API key, the Mailgun domain, and the region. Mailway posts the message as raw MIME, so Mailgun receives relayed mail byte-for-byte, with the same automatic exceptions as over SMTP.
- SMTP: pick the region (
smtp.mailgun.orgorsmtp.eu.mailgun.org) and paste the SMTP login and password.
Secrets are encrypted at rest.
-
Attach it to a project.
Open the project, attach the provider, and position it in the failover order. Send something — the provider health panel starts filling in.
Delivery events
Section titled “Delivery events”Without delivery events, Mailgun only reports that it accepted the mail. With them, Mailgun tells Mailway what happened afterwards.
-
Open delivery tracking. In the console, open the provider → Delivery tracking (beside Configure). Mailway creates the provider’s webhook URL and shows it ready to copy. The URL contains a per-provider secret — treat it like a password (regenerating it at the bottom of the dialog revokes the old one instantly).
-
Add the webhooks in Mailgun. In Mailgun’s webhook settings for the domain, add the URL you copied for Delivered, Permanent failure, Temporary failure, and Spam complaint. Opens, clicks, and unsubscribes can stay off — Mailway never tracks engagement (your mail stays byte-identical), so those events are ignored.
-
Store the signing key (required). Copy Mailgun’s HTTP webhook signing key (in its API security settings) and paste it into the dialog’s Paste the signing secret step (Mailgun webhook signing key). Mailway accepts only events that carry Mailgun’s valid signature with a timestamp within five minutes: until the key is stored, every event sent to the URL is refused.
What each event does in Mailway
Section titled “What each event does in Mailway”| Mailgun event | Mailway outcome |
|---|---|
| Delivered | The mail turns delivered (confirmed by the provider’s event). |
| Permanent failure | The mail turns bounced; the address is auto-suppressed for the project. |
| Temporary failure | Recorded as soft_bounced (temporary; a later delivery outranks it). Mailgun is still retrying. |
| Failure from Mailgun’s own suppression list | Recorded as dropped: Mailgun refused to send to an address it already suppresses. The mail keeps its state. |
| Rejected | Recorded as dropped: Mailgun refused the message before sending. The mail keeps its state. |
| Spam complaint | The mail turns complained; the address is auto-suppressed. |
Check the connection
Section titled “Check the connection”- Connection check. For each transport the account has, the provider page’s connection check logs in over SMTP or reads your Mailgun domain over the API, without sending anything.
- Delivery events. Use the test button next to the webhook in Mailgun: the sample event is acknowledged, and the Delivery tracking dialog’s last step ticks when it arrives. After a real send, the mail’s timeline shows the delivered or bounced step with Mailgun’s own response details attached.
What Mailgun changes
Section titled “What Mailgun changes”Not tested yet. What Mailgun changes before delivery will appear in What providers change once it is.
Limits
Section titled “Limits”Your Mailgun plan’s own sending limits apply. Mailway adds none for Mailgun beyond your Mailway plan’s quotas.
Cookie consent
We may run ads on Google and Reddit. If we do, knowing whether they work needs your OK for one cookie each from them, used only to tie a signup back to the ad that brought it. Analytics here is cookieless either way, and declining changes nothing else.
Change your mind any time with "Cookie choices" in the footer. Details in the privacy policy.