【问题标题】:Actionable messages via email is showing empty content in outlook通过电子邮件发送的可操作消息在 Outlook 中显示空内容
【发布时间】:2019-07-30 06:09:02
【问题描述】:

我正在使用 powershell 脚本和 smpt 服务器发送电子邮件。

我正在从本地路径读取 html 文件以发送可操作的电子邮件消息。

下面是我的html文件:

<script type="application/adaptivecard+json">{
   "type":"AdaptiveCard",
   "version":"1.0",
   "hideOriginalBody":true,
   "body":[
      {
         "type":"TextBlock",
         "text":"Visit the Outlook Dev Portal",
         "size":"large"
      },
      {
         "type":"TextBlock",
         "text":"Click **Learn More** to learn more about Actionable Messages!"
      },
      {
         "type":"Input.Text",
         "id":"feedbackText",
         "placeholder":"Let us know what you think about Actionable Messages"
      }
   ],
   "actions":[
      {
         "type":"Action.Http",
         "title":"Send Feedback",
         "method":"POST",
         "url":"https://...",
         "body":"{{feedbackText.value}}"
      },
      {
         "type":"Action.OpenUrl",
         "title":"Learn More",
         "url":"https://docs.microsoft.com/outlook/actionable-messages"
      }
   ]
}</script> 
Visit the Outlook Dev Portal to learn more about Actionable Messages.

reference :https://docs.microsoft.com/en-us/outlook/actionable-messages/send-via-email#feedback

outlook 中只有 body 标记部分可见,json 部分不可见。 为什么 Json 不工作? 使用此代码的正确方法是什么? 我应该使用 filename.html 或 filename.Json 的文件名是什么?

如果我将文件名另存为 .html 和 .JSON,则 JSON 在 codeplayground 中工作,但无法工作。

请指导我。

如果有人能帮助解决这个问题,我们将不胜感激。

谢谢。

【问题讨论】:

    标签: html json outlook actionable-notification


    【解决方案1】:

    “originator 属性必须设置为由 Actionable Email Developer Dashboard 生成的有效提供商 ID。发送给其他人时将此属性留空会导致卡片被移除。”

    如果你只是想测试发件人和收件人必须是同一个帐户。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-06-28
      • 1970-01-01
      • 2011-09-14
      • 2012-03-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-23
      相关资源
      最近更新 更多