Amazon web services 在AWS中,如何使用SES API配置收件箱预览文本?

Amazon web services 在AWS中,如何使用SES API配置收件箱预览文本?,amazon-web-services,aws-lambda,amazon-ses,Amazon Web Services,Aws Lambda,Amazon Ses,我目前正在Lambda函数中执行此操作(省略了许多代码行): 当我在Microsoft Outlook中收到电子邮件时,它会在主题下方显示以下文本: (可选)此文本将显示在收件箱预览中,但不会显示在电子邮件正文中 如何将该文本配置为其他内容? 我在房间里找不到它。我尝试搜索该文本,但在谷歌上也没有看到任何内容。我没有为此使用SDK(我自己编写),但基于API文档,它应该是这样的: Message: { Body: { Html: {

我目前正在Lambda函数中执行此操作(省略了许多代码行):

当我在Microsoft Outlook中收到电子邮件时,它会在主题下方显示以下文本:

(可选)此文本将显示在收件箱预览中,但不会显示在电子邮件正文中

如何将该文本配置为其他内容?


我在房间里找不到它。我尝试搜索该文本,但在谷歌上也没有看到任何内容。

我没有为此使用SDK(我自己编写),但基于API文档,它应该是这样的:

Message: {
        Body: {
            Html: {
                Data: html
+           },
+           Text: {
+               Data: 'add this section and put the preview data here'
            }
        },
        Subject: {
            Data: subject
        }
   },

Outlook中的收件箱预览文本似乎将基于设置的
HTML
文本。

用Michael的答案中的
Text
属性进行实验,可以帮助我解决这个问题。在我的HTML中,我发现我有:

<!-- Visually Hidden Preheader Text : BEGIN -->
<div style="display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family: sans-serif;">
    (Optional) This text will appear in the inbox preview, but not the email body.
</div>

(可选)此文本将显示在收件箱预览中,但不会显示在电子邮件正文中。

改变这一点解决了我的问题*facepalm*(其他人给了我要发送的HTML,我没有仔细查看。)

谢谢!这最终帮助我找到了答案。在SESV2SDK上对我不起作用
<!-- Visually Hidden Preheader Text : BEGIN -->
<div style="display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family: sans-serif;">
    (Optional) This text will appear in the inbox preview, but not the email body.
</div>