I want to use email templates for different emails (signup, forgot pass etc). I tried to use node-email-templates but getting nothing while rending email template.
Please see my code below:
var path = require('path'),
templatesDir = path.join(__diame, '..', 'views/mailer'),
emailTemplates = require('email-templates');
emailTemplates(templatesDir, function (err, template) {
// Render a single email with one template
var locals = {
useame: 'John'
};
template('signup', locals, function (err, html, text) {
console.log(html);
console.log(err);
});
});
I am getting "undefined" for both "html" and "err". Please suggest some solution.
