我正在使用 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 中只有正文标记部分可见,json 部分不可见。为什么 Json 不工作?使用此代码的正确方法是什么?我应该使用 filename.html 或 filename.Json 的文件名是什么?
如果我将文件名另存为 .html 和 .JSON,则 JSON 在 codeplayground 中工作并且无法工作。
请指导我。
如果有人帮助解决这个问题,将不胜感激。
谢谢。