Get your API key
All integrations Email Infra

Mailgun + MailKite

Mailgun is an email API and SMTP service. MailKite is a drop-in replacement — same SMTP interface, same patterns, but with inbound-first architecture and unlimited free domains.

What you need

  • A verified domain with SPF + DKIM published
  • Your API key (mk_live_…)
  • Mailgun account (optional — MailKite replaces it)

Send email

Swap your SMTP host from Mailgun to MailKite — no code changes needed.

smtp-config
# MailKite as a Mailgun drop-in replacement
# Same SMTP settings, different provider

SMTP Host: smtp.mailkite.dev
SMTP Port: 587
SMTP Username: mailkite
SMTP Password: mk_live_...
From: hello@yourdomain.com

# Mailgun SMTP was:
# SMTP Host: smtp.mailgun.org
# Port: 587
# Just swap the host and key

Receive inbound email (optional)

MailKite's inbound webhook uses cleaner field names than Mailgun's forwarding format.

inbound-comparison
# MailKite inbound webhook (same pattern as Mailgun)
# POST https://your-endpoint.com/webhook
# Payload: { from, to, subject, text, html, attachments }

# Mailgun used: recipient, sender, subject, body-plain, body-html
# MailKite uses: from, to, subject, text, html, attachments
# Same concept, cleaner field names

Test it

Swap your SMTP host from smtp.mailgun.org to smtp.mailkite.dev and send.

terminal
# Quick test
echo "Test" | swaks --to test@example.com --from hello@yourdomain.com \
--server smtp.mailkite.dev --port 587 \
--auth USER=mailkite --auth-password mk_live_...

Troubleshooting

  • Mailgun charges per domain on some plans. MailKite includes unlimited domains free.
  • If migrating, just update the SMTP host and API key — same interface.
  • Mailgun's inbound webhook payload uses recipient/sender; MailKite uses to/from.

See the SMTP relay docs for the full connection reference, or all integrations for other platforms.