通过nodejs发送原始的HTML到电子邮件hoganjs模板在电子邮件客户端提供原始的HTML输出

我有一个angular度的前端应用程序发送一个http POST请求与下面的原始HTML作为正文:

<h1>Hello World</h1><ol><li>Yo</li><li>Bro</li></ol>

我的nodejs后端使用sendgrid发送它,我也使用HoganJs进行模板化。

但是,我收到了我的电子邮件。

在这里输入图像说明

UPDATE

nodejs-sendgrid

 sendgrid.send({ to: req.body.mail.email || "", replyto: "someemail@gmail.com", from: "someemail@gmail.com", subject: req.body.mail.subj, html: template.render(req.body.mail), }, function(err, json) { // do something }); 

 sendgrid.send({ to: req.body.mail.email || "", replyto: "someemail@gmail.com", from: "someemail@gmail.com", subject: req.body.mail.subj, html: "<b>Hello World</b>", }, function(err, json) { // do something });