MailGun Setup
Super Speedy Emails sends through WordPress’s standard wp_mail() function. That means whatever SMTP / MailGun plugin handles wp_mail will deliver SSE’s messages — you do not need to configure MailGun credentials in SSE itself.
The only MailGun-specific configuration in SSE is the webhook, which lets MailGun feed delivery / open / click / bounce / complaint events back into SSE so the per-message audit log gets fully populated.
💡 If you’re already happily using a MailGun WordPress plugin (the official MailGun plugin or one of the SMTP plugins with a MailGun provider), keep using it. SSE just rides on top of
wp_mail.
Table of Contents
Step 1 — DNS setup (one-time)
This is unchanged from any other MailGun-based site, but worth a quick checklist:
- In MailGun, Add Domain for your sending sub-domain (e.g.
mg.yoursite.com). - Add the MX, TXT (SPF + DKIM), and CNAME records MailGun shows you to your DNS provider.
- Wait for MailGun to flip the domain status to Active (usually minutes, occasionally hours).
- Add a DMARC record if you don’t already have one: a
p=quarantinepolicy is fine to start, tighten top=rejectonce you’ve watched a week of MailGun reports.
If you’re new to this, see MailGun’s own guide — it’s better than I can do in a paragraph.
Why a sub-domain and not the apex domain?
Email reputation is per-sending-domain. Using a sub-domain (mg.yoursite.com) keeps your transactional/marketing reputation isolated from anything else sending as your apex domain (Google Workspace email, support ticketing systems, etc.). A complaint against marketing won’t poison your inbox-to-inbox emails.
Step 2 — Configure wp_mail to use MailGun
This is the standard WordPress + MailGun integration; pick one and configure it:
- Official MailGun plugin — enter API key + domain. Test send.
- WP Mail SMTP (Pro) — has a MailGun mailer option.
- FluentSMTP — free, with a MailGun provider.
- Or roll your own with a
phpmailer_initfilter.
Any of these will work. Send a test email through whichever plugin you choose and confirm it shows up in MailGun’s Logs. Once that’s working, SSE’s sends will route through it automatically.
Step 3 — Configure the SSE webhook
This is what gives you the rich event log (delivered / opened / clicked / bounced / complained) for every campaign you send.
In SSE admin
- Go to SSE Emails > Settings > Sending.
- In the MailGun section you’ll see your Webhook URL — copy it. It looks like:
https://yoursite.com/wp-json/sse/v1/mailgun-webhook
- In Webhook signing key, paste your MailGun webhook signing key (from MailGun > Sending > Webhooks). This is not the API key — it’s a separate value MailGun uses to sign event payloads.
- Click Save Settings.
In MailGun
- Log into MailGun, go to Sending > Webhooks.
- For each of these events, paste the URL from step 2 above: –
delivered–opened–clicked–permanent_fail–complained–unsubscribed - Save each one.
- Click Test webhook on any of them — MailGun sends a sample payload. Check SSE Emails > Subscribers > [any subscriber] > Email history or the
wp_sse_email_eventstable to confirm it landed.
⚠️ Without the webhook configured, SSE will still send mail, but the email log will be stuck at status
sentand never advance todelivered/opened/etc. The send works; the reporting just doesn’t.
Step 4 — Sender identities per category (optional)
In SSE Emails > Settings > Sending there’s a section called Sender identity per category. For each of the six categories you can override:
- From name
- From email
- Reply-To
Leave blank to fall back to the global From: under Settings > General.
Recommended pattern for a single sub-domain:
| Category | From email |
|---|---|
newsletter | articles@mg.yoursite.com |
list_broadcast | news@mg.yoursite.com |
product_marketing | offers@mg.yoursite.com |
product_support | support@mg.yoursite.com |
onboarding | welcome@mg.yoursite.com |
transactional | noreply@mg.yoursite.com |
All use the same sub-domain so DNS/DKIM is set up once. Recipients see distinct addresses per email type, which helps with their own filtering and improves your inbox placement over time.
When to split into multiple sub-domains
You can keep one sub-domain forever and tag messages with categories — MailGun’s stats will still let you see complaint rates per category. Only split when:
- MailGun’s dashboard shows the marketing category has a meaningfully higher complaint rate than the transactional one, and
- You’re starting to see deliverability problems on the transactional side.
Typical pattern when you split: marketing.yoursite.com for marketing + newsletter, email.yoursite.com for transactional + product_support + onboarding. Then the From overrides in SSE point to the right sub-domain per category.
Verifying it all works
- Compose a one-message test broadcast in SSE Emails > Campaigns. Set the audience to “All active subscribers” or a small test list.
- Switch send mode to Live (Settings > Sending) — confirm the admin banner that says “test mode” is gone.
- Hit Send test to me on the campaign editor. The message goes to your WP user’s email.
- Check MailGun Logs — the message should appear within seconds with the message-id you can match against
wp_sse_email_log. - Open the email; click any link. Within ~10 seconds the corresponding rows in
wp_sse_email_eventsshould arrive withevent = openedandevent = clicked.
If steps 1-3 work but 4-5 don’t, your sending is fine but the webhook isn’t reaching SSE. Most common causes:
- Wrong signing key in the SSE settings (gives a silent 401 — check
wp_sse_email_eventsfor received-but-rejected entries). - Firewall blocking POSTs to
/wp-json/from MailGun’s egress IPs. - Multi-site or non-standard REST endpoint — verify by hitting
https://yoursite.com/wp-json/sse/v1/mailgun-webhookin a browser, you should see a JSON error (the endpoint is POST-only).
- Sending Campaigns — how the From addresses are used per category
- Tracking & Reporting — what the webhook events power
- Test Modes — running everything end-to-end without hitting MailGun