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

查看:51
本文介绍了在 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 旨在分发通知. 这些可以以多种格式接收,例如电子邮件、短信、推送的消息到 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天全站免登陆