Mailgun
Mailgun is a reliable email delivery service. Entrig connects to Mailgun using your API key and sends emails from your active sending domain.
What you’ll need
- A Mailgun account
- An active sending domain in Mailgun (sandbox domains only send to authorized recipients; use a verified custom domain for production)
- A Mailgun API key, found in Mailgun under Settings → API Keys → Private API key
Configure
-
Open Channels → Email in Settings
From the Entrig dashboard, go to Settings → Channels. Under the Email section, find Mailgun and click Configure.
-
Enter your API key and select region
Paste your Mailgun Private API key. Choose US or EU to match where your Mailgun account is hosted. EU accounts use
api.eu.mailgun.net. -
Click Connect
Entrig fetches your active domains from Mailgun. If no active domains are found, you can enter your domain and From address manually.
-
Select a domain
Choose an active domain from the dropdown. Only domains with
activestate are shown. -
Set the From address
Enter the email address notifications will be sent from (e.g.
notifications@yourdomain.com). It must use the domain you selected. -
Set the From name (optional)
Enter a display name that recipients will see (e.g.
My App). -
Save
US vs EU region
Mailgun operates two independent API endpoints:
| Region | API endpoint |
|---|---|
| US | api.mailgun.net |
| EU | api.eu.mailgun.net |
Your account and domains are tied to one region. Using the wrong region returns a 401 error even if your API key is correct.
Troubleshooting
”No active domains found”
Cause: You are using a Mailgun sandbox domain, all your domains are unverified, or you selected the wrong region.
Fix: Check your domain status in the Mailgun dashboard under Sending → Domains. Make sure you have completed DNS verification and that the region selected in Entrig matches your account region.
Emails going to spam
Cause: SPF and DKIM records are missing or not yet propagated for your domain.
Fix: In the Mailgun dashboard, open your domain settings and complete all DNS verification steps. A domain showing a green “Active” status has all required records in place.
”Mailgun API error: 401”
Cause: Wrong API key or wrong region selected.
Fix: Double-check that you are using the Private API key (not a public key) and that the region matches your Mailgun account region.
”Mailgun API error: 404”
Cause: The domain selected no longer exists or was deleted from Mailgun.
Fix: Reconfigure the channel and select a valid active domain.