Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending html content in AWS SNS(Simple Notification Service) emails notifications

I am using AWS SNS(Simple Notification Service) to send email notifications. In the content of the email, I have to represent data in tabular form. Currently I am using simple text string to print the table but that has formatting issues when the email is accessed through smaller screen devices like mobile and tablets, and the tabular data is just impossible to interpret. I wish to use html table instead of simple string table as html can be rendered more adequately by all size devices. So I want to represent my data in html table and want this table to be rendered by the email client, whatever it may be. Can this be done using AWS SNS?

like image 785
Shubham Mishra Avatar asked Aug 27 '15 06:08

Shubham Mishra


People also ask

Can SNS send HTML email?

It's not possible to send HTML emails using just the Amazon SNS. Instead, you can use Amazon SES to send the emails and SNS to trigger the sending process. So, if you have an endpoint which takes care of sending email through Amazon SNS. You can create a topic, subscribe to the endpoint to receive notifications.

Can you use AWS SNS to send email?

Amazon SNS is about sending basic notifications that can take the form of mobile push notifications, SMS's, and even emails. As well as mobile devices and email clients, these alerts can also be sent to various distributed services around the web.

Can SNS receive emails?

If you choose to receive your emails through Amazon SNS notifications, the maximum email size (including headers) is 150 KB. Larger emails will bounce. If you anticipate emails larger than this size, save the emails to an Amazon S3 bucket instead.


1 Answers

Amazon SNS is designed to distribute notifications. These can be received in a variety of formats, such as email, SMS, messages pushed to HTTP endpoints, mobile phone notifications and even triggering of AWS Lambda functions.

It is not designed as a fully-featured email system. It will only send text messages and appends an 'unsubscribe' footer at the bottom of the messages.

If you wish to send formatted emails, consider using Amazon Simple Email Service (SES), which improves email deliverability. Any content passed into Amazon SES is sent out to recipients, including HTML.

Amazon SNS is primarily about notification, rather than pretty content.

like image 161
John Rotenstein Avatar answered Sep 17 '22 17:09

John Rotenstein