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
- Verify your sending domain in Mailgun and add the DNS records it provides.
- Use the SMTP host and port 587 with your Mailgun SMTP credentials.
- Point your app or mailer at those settings and send a test.
A dedicated SMTP server, from $39.99/mo
Dedicated IP, unlimited sending, and automatic SPF/DKIM/DMARC - live in minutes, cancel anytime.
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.