Identify original email from Complaint SES notification

1k views Asked by At

Is there a way to identify the originating email from a complaint notification in Amazon's SES? For example if we have 3 different mailing groups all sending different emails, and the recipient doesn't like 1 of them and reports it as spam, is there anything in the SES notification that would help us identify which email, and therefore which mailing group, we need to act on?

2

There are 2 answers

3
jfneis On

Yes, there is! From the docs:

Monitor your bounces and complaints and remove any bounced or complained recipient addresses from your mailing list. You can be notified of bounces and complaints in one of two ways: by email or by Amazon Simple Notification Service (Amazon SNS) notifications. For more information, see Monitoring Using Amazon SES Notifications.

Basically you can receive an email of a SNS notification (email, SMS, queue, etc.) to handle this. I would suggest SNS as it's way more flexible and the cost shouldn't be a problem (considering you don't have loads of complaints, of course!). Take a look:

Monitoring Using Amazon SES Notifications

EDIT: to identify the specific message the complaint is about, you'll need to store the unique ID created by SES when you send the message. From this AWS blog post:

Amazon SES assigns a unique message ID to each email that you successfully submit to send. When Amazon SES receives a bounce or complaint message from an ISP, we forward the feedback message to you.

I have used complaints treatment but never paid attention to this message ID. Anyway, looks like the path to follow.

0
Arafat Nalkhande On

Yes, you can do that For each of the email that you send out via the SES, it gives back a messageID which is unique for every message that goes out (In your case it will be unique for each of the 3 mails that you send to the same recipient).

You need to persist that somewhere when you send emails.

Now when a complain occurs SES gives back the original messageId that this particular email was sent with.

And this way you can look up your local persistance and find out which of the 3 emails did the user complained for