Skip to main content
Mailgun events are tracked with specific event type IDs in SendPost, allowing you to distinguish between native SendPost events and Mailgun events.

Mailgun Event Types

Event TypeIDMailgun EventDescription
MG Processed48(generated)Email processed and sent to Mailgun
MG Sent49acceptedMailgun accepted the message for delivery
MG Delivered50deliveredEmail successfully delivered to recipient
MG Hard Bounced51failed (severity: “permanent”)Permanent delivery failure
MG Soft Bounced52failed (severity: “temporary”)Temporary delivery failure
MG Dropped53rejectedEmail rejected by Mailgun
MG Opened54openedRecipient opened the email
MG Clicked55clickedRecipient clicked a link
MG Spam Report56complainedRecipient marked email as spam
MG Unsubscribe57unsubscribedRecipient unsubscribed
MG Processed (ID 48) is generated by SendPost when the message is successfully submitted to Mailgun, not from a webhook event.

Bounce Type Details

Mailgun categorizes bounces based on the severity field in the failed event:
Permanent failure indicated by severity: "permanent". This includes invalid email addresses, non-existent domains, or permanent rejections. These addresses should be removed from your list.
Temporary failure indicated by severity: "temporary". This includes full mailboxes, temporary server issues, or rate limiting. Mailgun may retry these automatically.

Event Data

Each Mailgun event includes:
  • Message ID (for correlation)
  • Recipient email
  • Timestamp
  • SMTP response code and message (for bounces)
  • User agent (for opens)
  • Client IP address (for opens/clicks)
  • Clicked URL (for clicks)
  • Mailgun-specific IDs

Bounce Status Information

Mailgun provides detailed delivery status in the delivery-status field:
FieldDescription
codeSMTP response code (integer)
messageSMTP response message (string)
Example SMTP Codes:
CodeMeaning
250Success
421Service temporarily unavailable
450Mailbox temporarily unavailable
452Insufficient storage
550Mailbox unavailable (permanent)
551User not local
552Exceeded storage allocation
553Mailbox name invalid
554Transaction failed

Event Type Quick Reference

EventIDMailgun Webhook Event
Processed48(generated internally)
Sent49accepted
Delivered50delivered
Hard Bounce51failed (permanent)
Soft Bounce52failed (temporary)
Dropped53rejected
Open54opened
Click55clicked
Spam56complained
Unsubscribe57unsubscribed

Next Steps