【发布时间】:2021-06-17 14:23:47
【问题描述】:
我正在尝试通过 NodeJS 发送带有 APIS 的电子邮件,这是我设计的带有 HTML 和 CSS 的电子邮件。
当我在 CSS 中使用 % 符号并触发电子邮件时,邮递员会返回错误 500。但如果我从代码中的每个位置删除 % 符号,它就可以正常工作。
身体的某些部位在sn-p下面是这样的
{
"toAddress" : "author.details@example.com",
"subject" : "Test - Mail Server",
"body" : '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="padding-right: 0px;padding-left: 0px;" align="center">
<img align="center" border="0" src="https://www.google.com/images/srpr/logo3w.png" alt="Image" title="Image" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 100%;max-width: 580px;" width="580"/>
</td>
</tr>
</table>',
"fromAddress" : "example@example.com"
}
完整代码在这里:https://jsfiddle.net/f2vr40bu/
所以我想知道如何在正文中使用 '%' 或者我们是否需要转义/解析一些方法,任何提示或建议都会非常有帮助。谢谢你的时间:)
【问题讨论】:
-
请添加邮递员截图
-
@PDHide,添加了 Postman 的截图 :)
标签: html css node.js postman email-client