繁体   English   中英

如何使用 Amazon SES 获取 Email Sent 的副本?

[英]How to get copy of Email Sent using Amazon SES?

我每周都会通过亚马逊 SES 向所有买家发送发票。 所以通常每周会有 2k 到 4k 封电子邮件。 问题是我需要保留证据证明我已经通过邮件将发票发送给了客户。

我已经使用 amazon SES 设置了 ElasticSearch (Kibana) 来存储已发送的电子邮件(遵循这些步骤Amazon SES Steps )但这只是存储发送的电子邮件详细信息,而不是实际的 email 本身。 比如Kibana中存储的数据是

{
  "_index": "SES",
  "_type": "_doc",
  "_id": "4962123782858127318231234860998905801425260929613826.2",
  "_score": 1,
  "_source": {
    "eventType": "Send",
    "mail": {
      "timestamp": "2021-08-19T15:01:48.652Z",
      "source": "xxxxxxxxx@outlook.com",
      "sourceArn": "arn:aws:ses:xxxxxxxxxxxxxx:identity/xxxxxxxxxxx@outlook.com",
      "sendingAccountId": "xxxxxx06791",
      "messageId": "010f015b5fffb7ec-21d56945-2b90-41c3-81b2-c0ef03a0994b2-000000",
      "destination": [
        "xxxxxxxx@gmail.com"
      ],
      "headersTruncated": false,
      "headers": [
        {
          "name": "Received",
          "value": "from [192.XXX.1.11] ([45.XXX.XXX.13]) by email-smtp.amazonaws.com with SMTP (SimpleEmailService-d-0YLZJYHCB) id 4wywhmYezZnXqmVM5xEv for m.irshad.k@outlook.com; Thu, 19 Aug 2021 15:01:48 +0000 (UTC)"
        },
        {
          "name": "Content-Type",
          "value": "multipart/mixed; boundary=\"===============3068452615067814389==\""
        },
        {
          "name": "MIME-Version",
          "value": "1.0"
        },
        {
          "name": "Subject",
          "value": "Your Invoice - MY Company"
        },
        {
          "name": "From",
          "value": "xxxxxxxxx@outlook.com"
        },
        {
          "name": "To",
          "value": "xxxxxxxxx@gmail.com"
        },
        {
          "name": "X-SES-CONFIGURATION-SET",
          "value": "SentHistory"
        }
      ],
      "commonHeaders": {
        "from": [
          "xxxxxxxxx@outlook.com"
        ],
        "to": [
          "xxxxxxxxx@gmail.com"
        ],
        "messageId": "010f015b5fffb7ec-21d56945-2b90-41c3-81b2-c0ef03a0994b2-000000",
        "subject": "Your Invoice - MY Company"
      },
      "tags": {
        "ses:operation": [
          "SendSmtpEmail"
        ],
        "ses:configuration-set": [
          "SentHistory"
        ],
        "ses:source-ip": [
          "XX.XX.231.XX"
        ],
        "ses:from-domain": [
          "outlook.com"
        ],
        "ses:caller-identity": [
          "ses-smtp-user.20234805-132544"
        ]
      }
    },
    "send": {}
  },
  "fields": {
    "mail.timestamp": [
      "2021-08-19T15:01:48.652Z"
    ]
  }
}

存储的数据中没有关于发票 PDF 的正文或附件。 如何存储 email 的全部内容? 比如在Gmail 可以看到email发送的正文和附件。

您是否考虑过将 CC 或 BCC 收件人用于您的 SES 消息?

另一种选择是将消息发送到 SNS,然后将 SNS 配置为发送 email。SNS 可以将消息发送到多个目的地,包括 SES、另一个 SNS 主题、SQS 队列或为每个输入消息执行 lambda。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM