I am trying to send a template email with Postmark in Node.js
I created a template on the Postmark App website. I've looked through their documentation, but cannot find any way to go about sending a templated email.
Documentation Sources:
http://blog.postmarkapp.com/post/125849089273/special-delivery-postmark-templates http://developer.postmarkapp.com/developer-api-templates.html
I've tried a variety of methods, including:
client.emailWithTemplate("[email protected]",
"[email protected]",<template-id>, {
"link" : "https://example.com/reset?key=secret",
"recipient_name" : "Jenny"
});
TypeError: Object # has no method 'emailWithTemplate'
client.sendEmail({
"TemplateModel" : {
"customer_name" : "Jenny",
},
"TemplateId" : 6882,
"From": "[email protected]",
"To": "[email protected]",
}, function(error, success) {
if(error) {
console.log(error);
} else {
console.log(success);
}
});
Console Log Error: { status: 422, message: 'A \'TemplateId\' must not be used when sending a non-templated email.', code: 1123 }
Thanks!