Reputation: 7708
I have an angular front end app that sends a http
POST
request with the following raw HTML
as body :
<h1>Hello World</h1><ol><li>Yo</li><li>Bro</li></ol>
My nodejs
backend is sending it using sendgrid
and I am using HoganJs
for templating as well.
But I was receiving this on my email.
UPDATE
nodejs-sendgrid
sendgrid.send({
to: req.body.mail.email || "",
replyto: "[email protected]",
from: "[email protected]",
subject: req.body.mail.subj,
html: template.render(req.body.mail),
}, function(err, json) {
// do something
});
Upvotes: 1
Views: 269
Reputation: 6145
sendgrid.send({
to: req.body.mail.email || "",
replyto: "[email protected]",
from: "[email protected]",
subject: req.body.mail.subj,
html: "<b>Hello World</b>",
}, function(err, json) {
// do something
});
Upvotes: 1