Mailgun
Developer-focused email service with powerful API and debugging tools.
Overview
Mailgun is the email service built by developers, for developers. Founded in 2010 and now part of Sinch, Mailgun powers email for companies like GitHub, Slack, and Lyft. Its powerful API, detailed logging, and flexible configuration make it a favorite among technical teams.
With Authority Mailer SMTP, you can harness Mailgun's power without writing code. The plugin handles API authentication, error handling, and email formatting automatically.
Mailgun Features
Requirements
Before you start, make sure you have:
- 1Mailgun account
- 2Verified sending domain (recommended) or sandbox domain for testing
- 3API Key from Mailgun dashboard
- 4Region selection (US or EU)
Step-by-Step Setup Guide
Create a Mailgun Account
1. Go to mailgun.com and click "Sign Up"
2. Enter your email and create a password
3. Verify your email address
4. Complete the account setup wizard
Add and Verify Your Domain
For Testing (Sandbox Domain):
Mailgun provides a sandbox domain. You can only send to verified recipients.
For Production (Custom Domain - Recommended):
1. Go to Sending → Domains → Add New Domain
2. Enter your domain (e.g., mail.yoursite.com)
3. Choose your region (US or EU)
4. Add the provided DNS records:
- SPF record (TXT)
- DKIM records (TXT)
- Optional MX records for inbound
5. Click "Verify DNS Settings"
Get Your API Key
1. Click your profile icon → API Security
2. Under "Mailgun API keys", copy your Private API key
3. Or create a new key with "Create API key"
4. Note your region (US: api.mailgun.net, EU: api.eu.mailgun.net)
Configure Authority Mailer SMTP
1. In WordPress, go to Authority Mailer SMTP → Settings
2. Select "Mailgun" from the provider dropdown
3. Paste your API key
4. Enter your verified domain name
5. Select your region (US or EU)
6. Set your "From Email" (must be @yourdomain)
7. Set your "From Name"
8. Click "Save Settings" and "Send Test Email"
💡 Pro Tips
- Use Mailgun's email validation API to clean your lists before sending
- Set up webhooks to track deliveries, opens, and clicks
- Use tags to segment email analytics by type or source
- Monitor your IP reputation score regularly
- Consider EU region for GDPR compliance
🔧 Troubleshooting
❓ Emails only work to my own email address
✅ You're using a sandbox domain. Add your domain and verify it, or add authorized recipients in sandbox settings.
❓ API returns 401 Unauthorized
✅ Check that you're using the correct API key and the right region (US vs EU).
❓ Domain verification stuck
✅ DNS propagation can take up to 48 hours. Use a tool like MXToolbox to verify your records are published.
❓ Emails marked as spam
✅ Complete DKIM and SPF verification. Check your IP reputation in Mailgun's dashboard.
Ready to Set Up Mailgun?
Get Authority Mailer SMTP and start sending reliable emails in minutes.