使用AWS SNS(简单通知服务)发送附件 [英] Sending attachment using AWS SNS(Simple Notification Service)

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

问题描述

我正在使用 AWS SNS 发送警报电子邮件.现在,电子邮件内容确实很很长,因此我希望将其作为文件附件发送,而不是将其作为电子邮件内容发送.可以使用SNS完成此操作吗?

I am using AWS SNS for sending alert emails. Now the email content is really long therefore I wish to send it as a file attachment rather than sending it as a email content. Can this be done using SNS ?

推荐答案

不,不能.

SNS常见问题解答不会明确说明这一点,但可以推断出来从几条陈述中:

The SNS FAQ does not come out and explain this explicitly, but it can be inferred from several statements:

Amazon SNS消息最多可以包含256 KB文本数据,包括XML,JSON和未格式化的文本.

Amazon SNS messages can contain up to 256 KB of text data, including XML, JSON and unformatted text.

电子邮件"传输适用于最终用户/消费者,并且通知是常规的,基于文本的消息,易于阅读.

The "Email" transport is meant for end-users/consumers and notifications are regular, text-based messages which are easily readable.

此外,由于在发布到SNS时您无权访问电子邮件标题空间,因此无法为电子邮件客户端指定必要的多部分编码以决定嵌入式附件.您甚至无法发送HTML电子邮件(当然,您可以 ,但是符合标准的电子邮件客户端不会将其呈现为HTML).

In addition, since you do not have access to the email header space when publishing to SNS, it is not possible to specify the necessary multipart coding for an email client to decide an embedded attachment. You can't even send HTML emails (well, you could, but a standards-conforming email client would not render them as HTML).

现在,从理论上讲,许多电子邮件客户端将识别电子邮件正文中的http://...并将其转换为可单击的链接,从而使您可以链接到所需的文件...但是,这当然与附加文件不同.

Now, many email clients will theoretically recognize http://... in an email body and turn them into clickable links, allowing you to link to the desired file... but that of course is not the same thing as attaching files.

在SNS中似乎没有一种将文件附加到电子邮件的机制.

I there does not appear to be a mechanism for attaching files to emails in SNS.

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

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