Mailgun
Add a sending domain in Mailgun
Create a domain, copy DNS records, and wait for verification.
Mailgun sends on behalf of a domain you control. Agencies usually authenticate a subdomain like mail.client.com so root-domain SPF stays clean.
Step 1 — Add the domain
- Mailgun Dashboard → Sending → Domains → Add New Domain.
- Enter subdomain, e.g.
mail.clientco.com. - Region must match your account (US vs EU).
- Choose Send tracking options:
- Click tracking — optional; rewrite links through Mailgun
- Open tracking — optional; privacy/GDPR consideration for EU lists
Step 2 — Copy DNS records
Mailgun displays a table of records:
| Type | Purpose |
|---|---|
| TXT | SPF authorizing Mailgun |
| TXT | DKIM public key |
| CNAME | Tracking domain (if enabled) |
| MX | Optional for inbound/replies |
Copy host/name and value exactly into the client’s DNS panel.
Tip In Cloudflare, set DNS-only (grey cloud) for DKIM/SPF TXT records unless Mailgun docs say otherwise for your setup.
Step 3 — Publish at DNS host
- Log in to Cloudflare, Route53, Namecheap, etc.
- Add each record. Watch for hosts that auto-append
@or the root domain. - TTL: use 300–3600 seconds during setup; increase after stable.
Step 4 — Verify in Mailgun
- Return to Mailgun domain page → Verify DNS Settings.
- Green checks appear as DNS propagates (minutes to hours).
- If stuck 24+ hours, use
dig TXT mail.clientco.comor MXToolbox to compare live DNS vs Mailgun expected values.
Step 5 — Optional: DMARC
After SPF and DKIM pass, add DMARC at _dmarc.clientco.com — see SPF, DKIM, and DMARC.
Step 6 — Register domain in EonMailer
Even when Mailgun shows verified, add the same domain in EonMailer during Connect Mailgun so send readiness gates align.
Common failures
- Duplicate SPF TXT — Only one SPF record per hostname; merge includes.
- Wrong region domain — EU API can’t send US-verified domain.
- Proxied CNAME — Breaks DKIM on some providers.
Next: Connect Mailgun to EonMailer.