Use these exact values when configuring any email client or application to send through Mailgun servers.
| Parameter | Value |
|---|---|
| SMTP Host | smtp.mailgun.org |
| SMTP Port | 587 (TLS) or 465 (SSL) |
| Encryption | STARTTLS on port 587, SSL on port 465 |
| Username | Default SMTP credentials from your Mailgun dashboard (postmaster@yourdomain) |
| Password | Your SMTP password from the Mailgun dashboard |
Note: Mailgun SMTP credentials are domain-specific. Each sending domain has its own credentials. Find your SMTP login details in the Mailgun dashboard under Sending > Domains > Domain Settings > SMTP Credentials.
Follow these steps in order to configure SMTP access for Mailgun.
In your Mailgun dashboard, add your sending domain and complete DNS verification. This includes adding MX, SPF, DKIM, and tracking CNAME records to your domain's DNS.
Navigate to your domain's settings in Mailgun to find your SMTP credentials. You can use the default "postmaster@yourdomain" or create a new SMTP user with a custom login.
Enter smtp.mailgun.org as the SMTP host, port 587 with TLS, your full SMTP username, and your SMTP password from the Mailgun dashboard.
Send an email to yourself and an external address to confirm delivery. Check the Mailgun dashboard for delivery logs and any issues reported.
Most Mailgun SMTP issues fall into a handful of categories. Here's how to fix them quickly.
Mailgun requires domain verification before sending. Check your DNS records are correctly configured. Use the Mailgun DNS verification tool to confirm all records (MX, SPF, DKIM, CNAME) are properly set.
SMTP credentials are domain-specific in Mailgun. Make sure you're using credentials from the correct domain. Each sending domain has its own separate SMTP username and password.
Port 587 may be blocked by your network. Try port 465 with SSL encryption as an alternative. Corporate firewalls commonly block direct SMTP on port 587.
Mailgun has monthly sending limits based on your plan. Free accounts can send up to 5,000 emails/month. Exceeding limits results in temporary sending suspension until the next billing cycle.
Keep your account secure and your messages deliverable with these recommended approaches.
Create separate SMTP credentials for each application rather than sharing the postmaster account. This allows granular revocation if a specific application's credentials are compromised.
Complete all DNS verification steps including MX, SPF, DKIM, and tracking CNAMEs. Full verification improves deliverability and allows Mailgun to track opens, clicks, and bounces.
Configure webhooks to receive bounce, complaint, and delivery event notifications. This allows your system to maintain a clean list by removing invalid addresses promptly.
Track your domain's sending reputation in the Mailgun dashboard. High bounce rates and spam complaints can lead to throttling or suspension of your sending privileges.
Mailgun is a solid email service provider, but its SMTP offering can become costly at high volume and lacks advanced routing features. If you're hitting Mailgun's rate limits or paying per-email fees that add up at scale, a dedicated SMTP relay service with predictable pricing may be more cost-effective.
For teams needing deeper analytics, custom DKIM signing across multiple domains, and intelligent routing rules, an email API platform provides more control. Learn more about email deliverability and how to protect your sender reputation at scale.
Mailgun's limits depend on your plan. Free accounts can send up to 5,000 emails per month with 300 emails per day. Paid plans start at 50,000 emails per month and scale to millions for enterprise accounts.
Yes. Mailgun is specifically designed for custom domain sending. Add your domain, complete DNS verification, and you can send from any address within that verified domain.
Verify your domain is fully verified with correct DNS records. Check you're using the correct SMTP credentials from the right domain. Try switching from port 587 to port 465. Verify you haven't exceeded your sending limits.
Yes, Mailgun is well-suited for transactional email. It offers webhook event notifications, detailed logs, and good deliverability when properly authenticated. However, costs can scale with volume.
Navigate to your domain in Mailgun and go to Sending > Domain Settings > SMTP Credentials. You can create new SMTP users with custom usernames and passwords for different applications.
Start free with no card, or talk to sales for high-volume and enterprise.
Start SendingTalk to Sales