All ESPs

Transactional

Mailgun

Mailgun supports SMTP and HTTP API, with EU and US regions. Sending domains are authenticated with TXT-based DKIM (typically the 'mailo' or 'mta' selector) plus an SPF include and an MX record for tracking.

DNS records to publish

TypeHostValue
TXT@v=spf1 include:mailgun.org ~all
SPF (combine with existing record)
TXTmta._domainkeyk=rsa; p=<public key>
DKIM public key
MX@mxa.mailgun.org / mxb.mailgun.org
Tracking and replies (optional)
CNAMEemailmailgun.org
Tracking domain

Authentication setup

SPF

Add include:mailgun.org to your existing SPF record. Use the EU equivalent if sending from the EU region.

DKIM

Publish the TXT record Mailgun generates per sending domain.

DMARC

Standard rollout: p=none → quarantine → reject, with rua reporting.

Deliverability tips

  • Pick the region closest to your recipients (EU for European users) to comply with data residency and shorten latency.
  • Use Mailgun's suppression API to automatically drop bounces and complaints from your future sends.
  • Sign with both Mailgun's selector and your own keys if you also relay through other ESPs.
Mailgun setup docs

Related providers