如何使用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"
        },}
}

这是输出

enter image description here

请帮助我解决此问题。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)