Sending attachment using AWS SNS(Simple Notification Service)

前端 未结 1 496
情深已故
情深已故 2021-02-19 09:24

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

1条回答
  •  长情又很酷
    2021-02-19 09:46

    No, it can't.

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

    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.

    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).

    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.

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

    0 讨论(0)
提交回复
热议问题