Confused by Aws SES timestamp, how does it work? - amazon-web-services

I configured my SES notifications sent to SNS service. When I send email from SES using python, SNS send me notifications about email is sent & delivered with timestamps. But at that time I didn't receive email at all while Aws SES notifies me it's delivered. I received the email few minutes after that. Anyone can explain how these timestamps works?

The timestamps are when SES successfully sent the email message but those timestamps have nothing to do with how long it takes your mail client to check the mail server for new messages and download the messages to the client, or even how long your mail server takes to route the message to the right inbox (although that should be very fast).
Consider the case where your may client is configured to check for new emails every 5 minutes:
Minute 1: SES successfully delivers the email.
Minute 2: SNS delivers the notification to you with Timestamp 1.
Minute 5: Your email client checks the mail server and detects there is a new message, and downloads it.
You will see the message in your email client at Minute 5 although SES delivered it at Minute 1.
Hope this helps.

Related

Mail is not Getting delivered to few mail domains using SES

I am trying to mail S3 object by using Lmbda and SES services in AWS. Cloudwatch logs of lambda function shows that the mail is delivered successfully.
After testing further, I can see that the mail is getting delivered to only certain mail domains [ex: abc#xyz is receiving the mail but abc#def is not receiving the mail].
After subscribing to SNS topic, I could see that both [abc#xyz and abc#def] the mails have below same message.
smtpResponse":"250 2.6.0 010b01811af1d4fc-98135233-ebf2-4972-ae53-700ea8d2088a-000000#eu-west-2.amazonses.com 10358 bytes in 0.130, 77.489 KB/sec Queued mail for delivery"
Upon looking further, I got to know that many people were facing the same issue. But the mail got delivered in sometime for them. But in my case the mail is not getting delivered even after a day.
Can someone please tell me if there is something wrong with SES or the mail server?

Email not receiving Amazon SES and SNS

Maybe someone knows what the problem is. I can't properly set up receiving emails on SES and sending them to SNS.
There is a domain, conventionally #example.com.
I set up the rules set (active), rule, MX on the mail server, everything fine if I check it on mxtoolbox.com.
Pref
Hostname
IP Address
0
inbound-smtp.us-west-2.amazonaws.com
54.240.250.228 Amazon.com, Inc. (AS16509)
If I send an email from reply#example.com to any mail, then everything comes and is loggen via SNS, and when I want to receive email in reply#example.com, nothing happens on SES and nothing logged in SNS.
Maybe someone came across this?
Rule:
Recipients (All recipients under verified domains)
Actions 1. SNS Action Write email to SNS topic 111 using Base64

Unable to receive SNS messages

I had SNS working but understood I couldn't attach larger files to my messages but learned I could with SES. So I "connected" my SNS to SES using Configuring Amazon SNS Notifications for Amazon SES - Amazon Simple Email Service (I used the email address rather than domain).
After this configuration, I no longer received emails as I am in "Sandbox" mode. So, I deleted my email address from SES - nothing. I even deleted my email address from SNS topic and can't get any communication at all - even the "Request Confirmation" emails are not sent. It is not my Outlook service as I tested other emails.
Any advice would be much appreciated. I just want to get back to where I was able to send SNS messages.

Retrieve message details of a bounced email via Amazon SES / SNS

I'm using Amazon SES to send email. I've also set up Amazon SNS to receive notifications when emails bounce for whatever reason. This is working fine.
In the bounce notification I receive, I can see the date, the sender and the recipient. But the subject of the mail is not listed. See example
I do see a messageId in there. Is there an API to retrieve the message details? I also looked at Amazon SQS, but I'm not sure if that will work.
You can't retrieve message details by messageID after the message has been sent, as there is no API call available to do so. You would need to store relevant details about the message along with the message ID given in the successful response from SES when sending the email (either through the API or SMTP). The Developer Guide covers a similar case of retrieving the recipients, which mentions that you would need to
store a mapping between [your own] identifier and the Amazon SES message ID that Amazon SES passes back to you when it accepts the email.
This answer by an Amazonian in an SES support thread (albeit from 2012) also reinforces that you'd need to record the message ID when you send the message.
if you record the message ID, you can use the message ID to identify the [e-mail message] that bounced or complained and then update the mailing list.

Amazon SES Notifications (SNS) not working

I am still in the sandbox of Amazons SES trying set a bounce email handler.
I am using the mailbox simulator to test a bounce/complaint email.
I have created a SNS topic (and I have subscribed to receive notifications from this topic):
I have selected this topic to receive bounce email notifications, then I have disabled email notifications:
However, when I send e-mails to bounce#simulator.amazonses.com from SES I still receive a bounceback e-mail and there aren't updates in the SNS topic.
I will try to make this issue clearer with some screenshots.
It can happen outside the sandbox too.
I did not realise that the Amazon SES console can set a SNS bounce/complaint topic for the domain, as well as a separate SNS setting for every verified email address.
So each verified email address can have its own different SNS bounce/complaint topic if you want! If you want them all the same, you have to go and set them all up in the console: tell each one to use SNS, otherwise they have 'Email Feedback Forwarding' set to "enabled" and this will override the setting at domain level.
The configurations of not receiving "Email Feedback" and sending Bounce emails to SNS Topic were set to my Domain example.com.
In my Verified Emails I had myself#example.com and I was sending e-mails with it.
It happens that my verified e-mail itself had these configurations too, so when I set them to be like those of my domain, everything started working.
If I had tried to send e-mails with anythingelse#example.com it would've worked.
Email Feedback Forwarding and SES notifications via Amazon SNS are exposed as two separate mechanisms. The linked documentation describes as much:
You must receive bounce and complaint notifications either by email or
through Amazon SNS – The default method is by email, through a feature
called email feedback forwarding.
Since you've shown that Email Feedback Forwarding is disabled, you are likely still receiving bounce notifications via your verified SNS email subscription.
To test, try removing your email subscription from the SNS topic and then sending an email to the bounce simulator again. To test further, you could subscribe a different email address or even an SQS queue to verify that bounce notifications are still being published.