Sending & Deliverability

MailGun Setup

Last updated July 7, 2026

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.


Step 1 — DNS setup (one-time)

This is unchanged from any other MailGun-based site, but worth a quick checklist:

  1. In MailGun, Add Domain for your sending sub-domain (e.g. mg.yoursite.com).
  2. Add the MX, TXT (SPF + DKIM), and CNAME records MailGun shows you to your DNS provider.
  3. Wait for MailGun to flip the domain status to Active (usually minutes, occasionally hours).
  4. Add a DMARC record if you don’t already have one: a p=quarantine policy is fine to start, tighten to p=reject once 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_init filter.

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

  1. Go to SSE Emails > Settings > Sending.
  2. In the MailGun section you’ll see your Webhook URL — copy it. It looks like:
https://yoursite.com/wp-json/sse/v1/mailgun-webhook
  1. 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.
  2. Click Save Settings.

In MailGun

  1. Log into MailGun, go to Sending > Webhooks.
  2. For each of these events, paste the URL from step 2 above: – deliveredopenedclickedpermanent_failcomplainedunsubscribed
  3. Save each one.
  4. 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_events table to confirm it landed.

⚠️ Without the webhook configured, SSE will still send mail, but the email log will be stuck at status sent and never advance to delivered/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:

CategoryFrom email
newsletterarticles@mg.yoursite.com
list_broadcastnews@mg.yoursite.com
product_marketingoffers@mg.yoursite.com
product_supportsupport@mg.yoursite.com
onboardingwelcome@mg.yoursite.com
transactionalnoreply@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

  1. Compose a one-message test broadcast in SSE Emails > Campaigns. Set the audience to “All active subscribers” or a small test list.
  2. Switch send mode to Live (Settings > Sending) — confirm the admin banner that says “test mode” is gone.
  3. Hit Send test to me on the campaign editor. The message goes to your WP user’s email.
  4. Check MailGun Logs — the message should appear within seconds with the message-id you can match against wp_sse_email_log.
  5. Open the email; click any link. Within ~10 seconds the corresponding rows in wp_sse_email_events should arrive with event = opened and event = 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_events for 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-webhook in a browser, you should see a JSON error (the endpoint is POST-only).

Related

Leave a Reply

Your email address will not be published. Required fields are marked *

×
1/1