Skip to main content

Prerequisites

The connector should already be set up, with a Connector Profile and a Linked Account. See Getting Started on the Mailgun connector page.

How Mailgun webhooks are set up

StackOne creates and manages the webhook subscription automatically when the account is connected - there is nothing to configure in Mailgun and no URL to paste. StackOne registers one account-level Mailgun webhook per event you enable, and removes them when the account is disconnected.

  • Webhooks are account-level, so they fire for every sending domain on the Mailgun account.
  • Only the events you enable in StackOne are registered in Mailgun and delivered.

Available webhook events

The following Mailgun message events can be enabled.

1

Message pipeline events

Events fired as Mailgun processes an outgoing message.

  • Accepted (accepted) — Fired when Mailgun accepts a message for sending and queues it
  • Delivered (delivered) — Fired when the recipient’s mail server accepts the message
  • Permanent Failure (permanent_fail) — Fired when a message permanently fails to deliver (hard bounce, suppressed recipient, or retries exhausted)
  • Temporary Failure (temporary_fail) — Fired when the recipient’s mail server temporarily defers the message (soft bounce); Mailgun keeps retrying
2

Engagement events

Events fired by recipient interactions with a delivered message.

  • Opened (opened) — Fired when a recipient opens the message. Requires open tracking on the sending domain
  • Clicked (clicked) — Fired when a recipient clicks a tracked link. Requires click tracking on the sending domain
  • Unsubscribed (unsubscribed) — Fired when a recipient unsubscribes through the Mailgun unsubscribe link
  • Spam Complaint (complained) — Fired when a recipient marks the message as spam

Delivery format

Each request carries one event under event-data, with a signature block (timestamp, token, and an HMAC-SHA256 signature made with the account’s Webhook Signing Key). Both failure events arrive with event failed, and severity tells them apart. Test deliveries from Mailgun’s Send test webhook button are flagged is-test-mode and are acknowledged without being delivered as events.

Verify

Your Connector should now be able to receive and process events. Try triggering an event and you should see an Event appear in the Connector logs.