Amazon SES does nothing - amazon-web-services

I'm trying to use the Amazon SES sendTemplatedEmail function.
I have:
verified the sending domain
verified various emails (company, google, gmx)
am in the sandbox
created all the templates
send test emails and verification emails and they went through
I do:
send out emails to the same email as the sender and receive a valid message id
to a company email and receive a valid message id
to a google email and receive a valid message id
to a gmx email and receive a valid message id
No emails are getting delivered and none occur in the send statistics.
What can I do now in order to debug that?
Update
I found a "RenderingFailure" in CloudWatch, and that hints to the error. I can't find the actual error, though.

Took me a while to finally debug this.
I ran this command to test out the template rendering:
aws ses test-render-template --template-name myTemplate --template-data "{\"key\":\"value\"}"
This finally showed me what was wrong (I referenced a {{token}} which wasn't defined in my template-data.
If anyone at AWS is reading this please either default to an empty string or at least show an error message while sending!

This is called Rendering Failure which happens when the template data you passed doesn't match with the template variables you have in your template. You can set SNS notification so that you get notified anytime this rendering failure occurs.
I have written a blog to tackle this. Please have a look at https://dev.to/nabinadhikari/aws-simple-email-service-caveat-5jn

Related

How to stop receiving ‘AWS Notification Message’

I’m set up with AWS and for every email that gets generated by my website a subsequent email is fired off by aws with the header:
‘AWS Notification Message’
Is there a way to stop this from happening? It is going to my bounce back email if that helps in anyway. I’m suspecting I may have a setting enabled but I’ve been through much of AWS and can’t figure it out.
There is a link in the email to unsubscribe it with the below message.
"If you wish to stop receiving notifications from this topic, please click or visit the link below to unsubscribe:"
Screenshot for your reference.

How to setup an email address for sending only?

My main goal is to setup an email address for my server to use for sending emails only.
I did some research, and it looked like Amazon Simple Email Server and/or Amazon Workmail could provide me with what I needed. I've gotten as far as setting up SES and Workmail so that I can set my server to be able to send emails. However, I saw that once the Workmail inbox is full (50GB), the account would be unable to send emails. Given that this is going to be used by the server and not a human, I didn't want the inbox to get filled with auto replies, spam, or failed to send messages, and then be unable to send emails. So, I went looking for a way to either:
A) prevent emails from being received and stored in the inbox
B) a rule I could setup to delete anything that didn't match the company domain
C) be able to read the inbox and delete email messages using the AWS CLI, and I'd setup my own script to manage how and what was deleted when
So far I haven't had any luck.
Again, I'm not particular how I achieve the goal, but I do preferably need to find a way to have an email address for a server to use exclusively for sending messages. I worry that if I leave it to employees to remember to login and clear the inbox, someone will forget, and then the server will stop sending emails.
Any direction or advice would be greatly appreciated.
I'm not well versed in email protocols; could I setup the address to return a bounce back always, and that would prevent it from receiving emails into it's inbox?
How are you generating these emails? If you are generating them programmatically (via an app/script), you may not need to set up a server. If you just route the outgoing mail through your app to SNS, the emails will be valid, however, there will be no "inbox" for incoming mail and they will just be dumped. This way you don't have to actually worry about an inbox getting full as it will just drop anything coming in.
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html
In order to receive emails though SNS, you have to go through the setup linked above, but if you do not set this up, then emails will just bounce. At least, that is how I have been doing it.

Failed to send direct email message via aws Pinpoint

I am trying to send email message to a specific email address via the aws pinpoint. My from email address is verified. However, whenever I try to send the email it gives me an error "Failed to submit email message to ". I don't understand where am I going wrong with this.
#Krishna gave the right clue, however to be precise, all of the following must be true:
Your From email address is verified in Amazon Pinpoint/SES.
Either your To email address(es) is verified, OR you have requested Sending Limit Increase specifically for Amazon Pinpoint, not just SES.
In my case it was problem no. 2, I have increased my sending limit for SES but not Pinpoint yet. Amazon treats them somewhat differently, however the error message it gave me was totally undecipherable:
Message not sent: We weren't able to send your email message to someemail#gmail.com. Request Id 982 : Failed to send message.
Specifically, check the Pinpoint project's right sidebar here:
By default Pinpoint provides an sandbox environment.
In order to send emails you need to white-list your from email address as well. ( i.e. got to SES and verify the from email id as well)
You should them be able to send emails via Pinpoint.
The receiver should acknowledge to terms and condition that AWS can send automated emails.

SparkPost suppression error and mail stops sending

I am using SparkPost for one of my Django website to send mails to users.
I had an update on site so sending mails to all users.
However few of users have deleted their Gmail id from Gmail and I understand that mails cannot be sent to those ids.
However problem I am facing is that in Django, SparkPost stops sending mails to all users once a single mail fails because of this.
Error message is this:
Message generation rejected Code: 1902 Description: recipient address was suppressed due to system policy
That specific error ...suppressed due to system policy is SparkPost saying that it decided not to send to a particular recipient address because it appears on its Global Suppression List. You can read about it here but basically, no-one should send email to addresses on that list so SparkPost rejects mail for them to avoid an later reputation damage.
That issue alone shouldn't stop all mail from flowing though. Here are a few other options to check out which would have that effect:
What error does SparkPost produce for the other failing messages?
Has your account been suspended? Log in to check.
Does your API key have correct privileges?
As an aside, you could also ask this question on the SparkPost Community Slack team.
You need to clean your mailing list prior to sending out mass mailings. This will weed out stale and unreachable emails to prevent bounce in the first place.
If you are using SparkPost lists, you can just use MailboxValidator to import and clean your list for you.
https://www.mailboxvalidator.com/resources/articles/how-to-import-email-list-from-sparkpost/
If you're not using SparkPost lists, you can dump out your mailing list and just upload into MailboxValidator for cleaning then you can just import the cleaned list back into your system.

Should I Expect the Forward("my.username#gmail.com") Route to Email Me?

I have my catch_all() set to forward("my.username#gmail.com"). I expected that any emails caught by this route would be forwarded to my email address as actual emails, but I never received them. The mailgun logs state that the message was routed, accepted, and delivered successfully.
What am I missing?
The problem ended up being gmail... I was sending my test messages from my gmail account and had the forward setup to return to my gmail. Gmail filters out loopbacks. Sending the test message from a different account yielded the expected results
You are correct, setting the catch_all and forward filters and actions does just that!
Did you set up the MX records for your domain properly? If not, that might be the issue (check Domains in the control panel)
Check the logs at https://mailgun.com/cp/log to debug the issue!
Best