如何将内容转换为 HTML 格式邮戳

how to convert the content in to HTML Format Postmark

我尝试像下面那样将内容发送到 Postmark 电子邮件模板

var username  = "Dear user,<br><br>&nbsp;&nbsp; &nbsp; &nbsp; Thank you for using our product.&nbsp; &nbsp;<br><b>Note :newly Features introduced </b><br>1.A <br>2.B.<br>3.<br><br>";
  client.sendEmailWithTemplate({
    "From": "abc@gmail.com", 
    "To": "xyz@gmail.com",
    "InlineCss": true,
    "TemplateId":123456,
    "TemplateModel" : {
        "content" : username
    }
    }, function(error, success) {
    if(error) {
        console.error("Unable to send via postmark: " + error.message);
        return;
    }
    console.info("Sent to postmark for delivery")
}); 

当我收到带有模板 HTML 的电子邮件时,标签会按原样出现。我怎样才能将它们转换成 HTML 格式,以便它以正确的格式出现。任何建议...提前致谢

知道了。通常我们使用 {{username}} (在我的例子中 var name 是用户名)在模板中显示。我们需要像这样使用 --> {{{username}}} .surrounding with extra curly braces to convert in the content in HTML format.For reference look here --> documentation here .谢谢