relay

Alternative to Mailgun

Mailgun is a developer-friendly SMTP and API provider with inbound routes. relay adds reputation monitoring and EU hosting, and it automates the DNS setup.

Best for a developer SMTP/API relay with EU data residency: Mailgun

Best for sending, receiving, and monitoring with automated DNS: relay

Quick comparison

Feature relay Mailgun
SPF Auto-served Manual record
DKIM RSA-1024, RSA-2048, Ed25519 RSA only
DMARC Auto-served Manual record
MTA-STS Auto-served Self-hosted
TLS-RPT Auto-served Manual record
Return-Path Auto-served Manual CNAME
Reputation monitoring DMARC + TLS-RPT parsed Separate product
Incoming mail MX + webhooks Routes (URL or storage)
EU data sovereignty EU (Germany), GDPR EU (Sinch, Sweden)
Free test domain Yes Sandbox, restricted
Pricing Flat per message Tiered, feature-gated

What Mailgun does well

Mailgun (now part of Sinch) is popular with developers for its API and SMTP relay. As of 2025, it handles both outbound and inbound, and it offers an email validation API. Sinch is a Swedish company, so Mailgun is EU-owned and offers EU data residency.

The trade-off is the manual side. DNS records are paste-it-yourself. DKIM key rotation is on you. DMARC analytics live in a separate deliverability product.

Where relay is different

All-in-one monitoring

The DMARC analytics in Mailgun are a separate deliverability product. relay ingests DMARC and TLS-RPT reports as first-class data. It parses them and shows reputation and failure trends in your dashboard.

Sending without DNS busywork

Mailgun generates SPF, DKIM, and tracking CNAME records for you to paste into your DNS provider. You rotate DKIM keys yourself. relay automates this. You delegate NS and set one DMARC record. relay then serves MX, SPF, DKIM, Return-Path, PTR, and TLS-RPT for you. relay signs mail with DKIM keys in RSA-1024, RSA-2048, and Ed25519, and it serves the MTA-STS policy over HTTPS. The built-in nameserver is the mechanism. You do not touch a DNS dashboard after the initial delegation.

Incoming mail

Mailgun Routes forward inbound mail to a URL or storage. DKIM and SPF for inbound are managed by Mailgun, not by you. relay runs an MX server that you control. It stores raw bodies in your own S3 and dispatches Standard Webhooks with Ed25519 signatures. You verify each delivery with a public key you hold.

EU data sovereignty

Mailgun is owned by Sinch, a Swedish (EU) company, and offers EU data residency. Here, relay and Mailgun are on equal footing. Both are EU-based and GDPR-aligned. relay adds a Germany-hosted stack with local support and no US data path.

Free test domain

relay ships a free sender domain to test deliverability before you delegate a real domain. Mailgun requires a verified domain and offers a sandbox with restricted sending.

When Mailgun makes sense

  • You need a high-volume SMTP relay with EU data residency.
  • You rely on the Mailgun email validation API.
  • You want one Sinch account for SMS and email.

The bottom line

Mailgun is a capable developer email API with inbound routes. relay is the better fit when you want reputation monitoring, automated DNS, and Germany hosting in one service.

Migrating from Mailgun to relay

  1. Add your domain in relay. Delegate NS to the relay nameservers.
  2. Set the DMARC record that relay gives you.
  3. Move your SMTP or API calls to relay with a per-org credential.
  4. Replace Mailgun Routes with relay webhook subscriptions.