如何解决如何使用dynamicTemplateData在Node.js中使用sendgrid发送电子邮件?
这是我第一次使用sendgrid接收邮件。我从数据库传递的动态数据有问题。实际上,HTML内容通过对象传递并在邮件中按原样显示。有关更多详细信息,请检查下面的对象。
javapackage
{
to: "to Email"
from: "from email",templateId: "Template ID",dynamicTemplateData: {
subject: "Testing Templates",name: "Some One",city: "Denver",week: "August 24 2020",job0: {
header: "Test",body: "<table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="
snip ">We are looking for physically fit individuals to fill general labour requirements by partnering with a truck driver. Your help is needed to load/unload the truck at the varIoUs job sites. <b>Skills required: </b> - comfortable with physical exertion and lifting minimum of 50lbs - works well on a team but trusted to work independently - reliable,self-motivated and committed to high standards of quality - able to read and understand work instructions <b>Specific requirements: </b> - in good physical condition - must have own safety footwear - reliable transportation to ensure punctual and consistent attendance If you meet the qualifications listed above,submit your resume in MS Word format via the link below. <i>PrevIoUsly employed with The Staffing Connection? Please contact our office to confirm your continued availability for these upcoming positions.</i></td> </tr> </tbody> </table>",cta: "Apply Now",url: "My URL"
},}
}
这是输出
请帮助我解决此问题。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。