Connect Mailgun

Signed webhooks for delivery events and Routes that forward inbound mail to Dextel.

Where this lives in Dextel

Agency: Agency → Integrations → Email Service (outbound only). Sub-account: Settings → Integrations → Email Integration (outbound + inbound). The modal shows the exact webhook URLs to paste into Mailgun; this page explains what to do with them.

Prerequisites

  • A Mailgun account and a domain you control (you'll add DNS records).
  • Owner or admin access to the Dextel agency or sub-account.
  • Credentials you'll enter in Dextel: API key, Sending domain (e.g. mg.yourdomain.com), Region (US or EU).

1. Create the API credentials

  1. Open Settings → API Security → Add new key and copy it.
  2. On the same page copy the HTTP webhook signing key — you'll paste it into the Delivery events tab.
  3. Enter the key, your sending domain and its region (US / EU) in Dextel.

Mailgun docs: API keys

2. Verify your sending domain

  1. Open Send → Sending → Domains → Add new domain (for example mg.yourdomain.com) and pick US or EU.
  2. Add the SPF TXT, DKIM TXT and tracking CNAME records to your DNS.
  3. Click Verify DNS settings.
  4. Under Domain settings → Tracking turn on Opens and Clicks.

Then in Dextel enter a From email on that domain (for example hello@yourdomain.com) and a From name, and click Validate & Connect. Dextel checks the credentials against Mailgun before saving.

Mailgun docs: domains

3. Delivery events

Delivered, opened, clicked, bounced and spam events feed the Email Event workflow trigger and automatically unsubscribe contacts after a hard bounce or complaint. Copy the Webhook URL from the Delivery events tab in Dextel, then:

  1. Open Send → Sending → Webhooks and select your domain.
  2. For Delivered, Permanent Failure, Temporary Failure, Complained, Opened and Clicked, add <your delivery-events webhook URL> as the URL.
  3. Paste the HTTP webhook signing key into Dextel.
This provider signs its webhooks. Paste the signing secret / verification key into the Delivery events tab — Dextel rejects unsigned posts.

Use Send a test email in the same tab to confirm outbound works; the events pill turns green once the first event arrives.

Mailgun docs: webhooks

4. Inbound email (sub-accounts only)

Inbound turns contact replies into Inbox conversations and fires the Contact Replied — Email trigger. Mail is received at your saved From address, so when a contact hits Reply the message comes back through Mailgun to Dextel. The MX record routes all mail for that domain to Mailgun: if you already receive mail on the domain, send from an address on a subdomain (for example hello@mail.yourdomain.com).

DNS records

TypeHostValuePriority
MXyourdomain.commxa.mailgun.org (EU: mxa.eu.mailgun.org)10
MXyourdomain.commxb.mailgun.org (EU: mxb.eu.mailgun.org)10

Steps

  1. Open your sending domain (yourdomain.com) in Mailgun.
  2. Add the two MX records below (both priority 10) and wait for Mailgun to verify them.
  3. Open Send → Receiving → Routes → Create Route. Expression type Match Recipient, expression .*@yourdomain.com.
  4. Tick Forward, paste <your inbound webhook URL>, then Create Route.

Limits

  • Routes forward messages up to 25 MB.

Mailgun docs: inbound

Troubleshooting

  • Credentials rejected — the API key, domain and region must all match; an EU domain with a US key fails.
  • Events 401 — the signing key is the HTTP webhook signing key under API Security, not the API key.
  • Still stuck? Compare with another provider on the Email Providers overview.