i tried like Below to send content to Postmark email template
var username = "Dear user,<br><br> Thank you for using our product. <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")
});
when i receive email with template HTML tags are coming as it is. How can i convert them in to HTML Format so that it comes in correct format. Any Suggestions... Thanks in Advance
Got it. Generally we use {{username}}
(in my case var name is username) to show in template. we need to use like this --> {{{username}}}
.surrounding with extra curly braces to convert the content in HTML format.For reference look here --> documentation here . Thanks.