1
votes

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.

2
you say emails not getting delivered and also say send test emails and verification emails and they went through. Contradicting. - helloV
Amazon allows you to send test emails via the web interface for verified emails. That works. - shredding
It sounds like you need to configure a rendering failure event. - Michael - sqlbot
Yeah, it did Not work. I do not know why but i wasnt able to get ses to push the events. I could fix it by manually logging the template to to the console and then run test-render-template in on the console. Super annoying and not at all simple. - shredding

2 Answers

5
votes

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!

2
votes

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