我有一个有角度的前端应用,可以发送http
POST
请求,并将以下原始HTML
作为正文:
<h1>Hello World</h1><ol><li>Yo</li><li>Bro</li></ol>
我的nodejs
后端正在使用sendgrid
发送它,我正在使用HoganJs
进行模板化。
但是我在电子邮件中收到了此消息。
更新
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
});
答案 0 :(得分:1)
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
});