在AWS SNS(简单通知服务)电子邮件通知中发送HTML内容 [英] Sending html content in AWS SNS(Simple Notification Service) emails notifications

查看:530
本文介绍了在AWS SNS(简单通知服务)电子邮件通知中发送HTML内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 AWS SNS (简单通知服务)发送电子邮件通知.在电子邮件的内容中,我必须以表格形式表示数据.目前,我正在使用简单文本字符串来打印表格,但是当通过较小的屏幕设备(例如手机和平板电脑)访问电子邮件时,表格出现了格式问题,而表格数据只是无法解释.我希望使用html表而不是简单的字符串表,因为所有大小的设备都可以更充分地呈现html. 因此,我想在 html表中表示我的数据,并希望该表由电子邮件客户端呈现,无论它是什么. 可以使用 AWS SNS 完成此操作吗?

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?

推荐答案

Amazon SNS旨在分发通知.这些通知可以以多种格式接收,例如电子邮件,SMS,推送的消息HTTP端点,手机通知,甚至触发AWS Lambda功能.

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.

如果您希望发送格式化的电子邮件,请考虑使用 Amazon Simple Email Service(SES),它可以提高电子邮件的可传递性.传递到Amazon SES的所有内容都会发送给收件人,包括HTML.

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主要是关于通知,而不是漂亮的内容.

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

这篇关于在AWS SNS(简单通知服务)电子邮件通知中发送HTML内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆