jwerre / ses_template_mailer

Send HTML or plain text templates through Amazon Web Services Simple Email Service (SES) using Handlebars, Jade, EJS or Underscore.
5 stars 1 forks source link

Does this handle RFC 2822 rules #3

Open rsmolkin opened 6 years ago

rsmolkin commented 6 years ago

Hi,

We've stumbled on your code while looking to a solution where some emails we were sending using Amazon SES SendRawEmail were bouncing with error codes 500, 501 and a few others due to lines being too long. It appears that subjects that are longer than 76 characters need to be split into multiple line with everything after the 1st line starting with a space and all lines ending with a CRLF.

Similar issue with HTML emails where it seems all HTML is treated as one line and also needs to be split up with CRLF.

Does your SES Template Mailer handle that?

jwerre commented 6 years ago

No it doesn't. As a matter of face it does not use SendRawEmail it uses sendEmail

jwerre commented 6 years ago

@rsmolkin Just out of curiosity why are you using sendRawEmail over sendEmail?

rsmolkin commented 6 years ago

Thanks. We need to add attachments to the emails. So I guess we either need to manually make sure that the messages are rfc2822 compliant or find a library that does that...