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.

Mailgun DNS records

Step 1 — Add the domain

  1. Mailgun Dashboard → SendingDomainsAdd New Domain.
  2. Enter subdomain, e.g. mail.clientco.com.
  3. Region must match your account (US vs EU).
  4. 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:

TypePurpose
TXTSPF authorizing Mailgun
TXTDKIM public key
CNAMETracking domain (if enabled)
MXOptional 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

  1. Log in to Cloudflare, Route53, Namecheap, etc.
  2. Add each record. Watch for hosts that auto-append @ or the root domain.
  3. TTL: use 300–3600 seconds during setup; increase after stable.

Step 4 — Verify in Mailgun

  1. Return to Mailgun domain page → Verify DNS Settings.
  2. Green checks appear as DNS propagates (minutes to hours).
  3. If stuck 24+ hours, use dig TXT mail.clientco.com or 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.