100% Inbox Delivery

HomeBlog › How to Mailgun smtp relay

How to Mailgun smtp relay

Published October 12, 2024 · Updated July 14, 2026 · SMTP & Deliverability

Mailgun is a developer-favourite email API, and its SMTP relay lets you send through Mailgun's infrastructure using standard SMTP instead of the API. It is a solid option for transactional mail - here is how the Mailgun SMTP relay works, and how it compares to a dedicated SMTP for volume sending.

How the Mailgun SMTP relay works

Rather than integrating the API, you point your app at Mailgun's SMTP host with credentials from your dashboard. Mailgun then authenticates, signs, and delivers your mail on shared or dedicated IPs, depending on your plan.

Setting it up

  1. Verify your sending domain in Mailgun and add the DNS records it provides.
  2. Use the SMTP host and port 587 with your Mailgun SMTP credentials.
  3. Point your app or mailer at those settings and send a test.
Shared vs dedicated: Mailgun's lower tiers use shared IPs; a dedicated IP costs more. If you want a dedicated IP and flat, predictable pricing for high volume, a dedicated SMTP is worth comparing.
Related reading: Cloudflare smtp relay · Gmail mail smtp · test your email deliverability
Ready to send

A dedicated SMTP server, from $39.99/mo

Dedicated IP, unlimited sending, and automatic SPF/DKIM/DMARC - live in minutes, cancel anytime.

See unlimited SMTP plans →See all plans

Frequently asked questions

What is the Mailgun SMTP relay?

A way to send through Mailgun using standard SMTP (host + port 587 + credentials) instead of its API - Mailgun handles authentication and delivery.

Does Mailgun give a dedicated IP?

Only on higher plans. For a dedicated IP with flat pricing at volume, compare a dedicated SMTP server.