Hi,
I set up a log for all incoming json notifications from amazon sns.
There are 2 major type of bounces.
Part 1: Permanent
In case of permanent failure this arrives from SNS:
{
"Type" : "Notification",
"Message" : "{\"notificationType\":\"Bounce\",\"bounce\":{\"bounceType\":\"Permanent\",\"bouncedRecipients\":[{\"emailAddress\":\"info@email.com\",\"diagnosticCode\":\"smtp; 550 no such address here\"}]},\"mail\":{\"destination\":[\"info@email.com\"]}}"
}
If you want to test if it works, you can do it by POST curl to https://yourdomain/mailer/amazon_api/callback
with the JSON body above.
Choose an email address existing in your system and NOT in the lead_donotcontact
table.
Once you post this content to the right URL, a new entry will be added to the table and the person will have a DNC, similar to this:
Important to know: the json feedback is not coming right away from Amazon SNS, as they also need to get some answer from the postbox of the recipient. This makes it really hard to test.
Part 2:
In case of temporary, or so calles Transient failure you would see something like this:
{
"Type" : "Notification",
"Message" : "{\"notificationType\":\"Bounce\",\"bounce\":{\"bounceType\":\"Transient\",\"bouncedRecipients\":[{\"emailAddress\":\"info@email.com\",\"diagnosticCode\":\"smtp; 552 5.2.2 Quota exceeded (mailbox for user is full)\"}]},\"mail\":{\"destination\":[\"info@email.com\"]}}"
}
But after posting this, I can’t see any trace of this notification in Mautic. It would be logical, that the bounce info is saved in the DNC table as softbounce, but I couldn’t find any info related. Also no new entries in lead_event_log.