I tried to send emails with Amazon SES, with the Java AWS SDK, and it worked. I would like to be able to check (at a later time) whether the delivery was successful. I will define it successful if the final mailserver accepted the mail for delivery.
I saw that when you send an email you can get a messageId that uniquely identifies your email:
SendEmailRequest request = new SendEmailRequest(from, destination, message);
SendEmailResult result = service.sendEmail(request);
String messageId = result.getMessageId();
However I saw that you can get only aggregated statistics, for example with SendDataPoint (Represents sending statistics data. Each SendDataPoint contains statistics for a 15-minute period of sending activity).
I'm not using SES to send bulk emails, but personalized notifications on a very low volume and I'd be interested to check every single message.
Did I overlook something? Is it possible to do this type of check with SES?
Open the Amazon OpenSearch Service console. Choose the domain that you created for storing your Amazon SES sending history. In the General information section, choose the link next to OpenSearch dashboards URL. Create an index pattern for the index name that you configured when you created the delivery stream.
On the All metrics tab, choose SES. Choose the dimension name that you entered when you created the configuration set. For example, choose ses:caller-identity. Under the ses:caller-identity column, you'll see the IAM user who sent the test email.
A client application, acting as an email sender, makes a request to Amazon SES to send email to one or more recipients. If the request is valid, Amazon SES accepts the email. Amazon SES sends the message over the Internet to the recipient's receiver.
After this the following outcomes are possible: Successful Delivery: The email is accepted by the Internet service provider (ISP) which delivers the email to the recipient. Hard Bounce: The email is rejected by the ISP because the recipient's address is invalid.
Amazon does provide a mechanism for you to capture bounces, which provides you with contrapositive verification.
You can create a mailbox to receive bounce notifications, then tell SES to forward bounce notifications there. e.g.:
request.setReturnPath("[email protected]");
You can then write code to periodically check that mailbox, and parse the messages for the destination email address.
Amazon provides a brief explanation of how they handle bounces & complaints here:
http://aws.amazon.com/ses/faqs/#37
However, if you want to check if the message avoided the spam filter or was read by the end user, that is beyond the scope of SES (although they work hard to ensure deliverability).
We use Bouncely.com. You simply set the ReturnPath
to [email protected]
and it tracks all the bounces and spam reports. It also has an API that allows us to unsubscribe users automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With