Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS SES - Logging SendEmail & SendRawEmail calls (SMTP)

We've changed our email service from Mandrill to Amazon SES. We are using it with SMTP.

In Mandrill we had access to some details such as:

  • raw content of the emails
  • delivery dates
  • is the email viewed by the recipient
  • are the links in the email clicked

But in SES Management Console > Sending Statistics page it shows only the numbers without any details for deliveries, bounces, complaints & rejects.

And I've looked into CloudTrail, CloudWatch & S3 combination with no luck. Also I'm not sure if this is still valid but this page says

All Amazon SES APIs except for the email-sending APIs (SendEmail and SendRawEmail) are supported.

So I can't seem to log these data with CloudTrail.

Can I log them via another method (maybe a third party tool?). How do other people log these? Or do they? Maybe it's not possible with SMTP but possible with only API?

Example scenario

We're using multiple IAM access keys (with multiple users) for SES. Let's say there is 50% increase in complaints. Doesn't AWS offer any tool to find the culprit access key?

like image 496
Taylan Avatar asked Apr 26 '16 16:04

Taylan


People also ask

Is AWS SES deprecated?

To enhance the security of Amazon SES customers, beginning October 1, 2020, support for Signature Version 3 will be turned off (deprecated) in Amazon SES, and only Signature Version 4 will be supported going forward.


2 Answers

I had found this thread when trying to get easy access to who Amazon SES sent emails to, at what time, etc. I found the tutorials at Amazon pretty helpful:

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/event-publishing-tutorials.html

I actually tried all four of them. I couldn't figure out how to get the CloudWatch path to actually show who the email went to, but the other ones worked. I eventually settled on the Amazon Redshift path:

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/event-publishing-redshift.html

It works well for me and provides an SQL query view into the "log" data. They do have a new Query tool, so you don't have to use JDBC/ODBC if you don't want to.

Hoping this will help someone else looking...

like image 90
Irv Salisbury Avatar answered Sep 21 '22 08:09

Irv Salisbury


For raw content logging, you would have to proxy the SMTP requests through some service that logs everything and then sends it to SES, or just log everything in your code before making the call to SES.

For delivery rates you would have to setup SNS listeners to process SES bounce notifications.

For email viewed and links clicked you would have to build your own analytics service to add tracking to the emails you send, or find some third-party service that does that for you.

There is a reason SES is so much cheaper than other email services like Mandrill, it is because you don't get all the features that the other services provide. Honestly if you want things like click tracking analytics I would suggest you rethink moving away from Mandrill, or look at other email services like SendGrid. SES is more of a raw email sending service that doesn't provide any of those higher-level features you are looking for.

like image 40
Mark B Avatar answered Sep 22 '22 08:09

Mark B