Question:
Why may a bounced and delivered email activity Record coexist having the same created date in Veeva CRM?
Answer:
The reason is due to a delayed bounce. Delayed bounces are bounces that occur after the recipient server accepts the message from the Mailgun system and returns a success response. So, they are not part of the original Simple Mail Transfer Protocol (SMTP) connection/transmission.
After the recipient server accepts the message, the message is bounced back by sending details of the message to the return path address listed on the headers. This is not uncommon with smaller providers or Office365 recipients.
Mailgun adds a failure to the suppression list if it is classified as a bounce. Within the message the payload severity and reason are seen. The reason must be listed as Bounce in order to be put on suppression. Those classified as Generic are not automatically placed on the customer suppression list. It is up to the sender to review those and decide whether or not they should be added.
Example:
{
"severity": "permanent",
"storage": {
"key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"envelope": {},
"delivery-status": {
"bounce-code": "5.0.0",
"message": "smtp; 550 Address unknown",
"code": 550,
"description": "This is the mail system at host host_name.com.\r\n\r\nI'm sorry to have to inform you that your message could not\r\nbe delivered to one or more recipients. It's attached below.\r\n\r\nFor further assistance, please send mail to postmaster.\r\n\r\nIf you do so, please include this problem report. You can\r\ndelete your own text from the attached returned message.\r\n\r\n The mail system\r\n\r\n<recipient@recipient.com>: host host_name.com[195.104.234.4] said:\r\n 550 Address unknown (in reply to RCPT TO command)\r\n"
},
"id": "-xxxxxxxxxxxxxxxxxxxxx",
"reason": "generic",
"user-variables": {
"X-Label": "{\"productId\":\"xxxxxxxxxxxxxxxxxx\", \"recipient\":\"recipient@recipient.com\", \"approvedEmailId\":\"xxxxxxxxxxxxxxxxxx\", \"externalId\":null, \"orgId\":\"xxxxxxxxxxxxxxxxxx\"}"
},
"flags": {
"is-delayed-bounce": true
},
"log-level": "error",
"timestamp": 1648463387.2238824,
"message": {
"headers": {},
"size": 4260
},
"recipient": "recipient@recipient.com",
"event": "failed"
}
In the payload above, the Severity and Reason may be seen. It is also indicated that Mailgun marked this as a delayed bounce. This means the recipient's mail provided and accepted the message giving Mailgun the verification (250 ok). After the recipients review internally and realize this Email Address does not exist, then the bounce information is sent. That is why there is a delivered event and a bounced event.
Related Documentation:
Mailgun documentation:
Knowledge Article: