خرید بک لینک

Vote count: 0

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.

asked 3 mins ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 30 فروردين 1395 ساعت: 20:39

صفحه بندی