From fa8a2c5c1b2c1bf09ef8daa6621e58811b929c9c Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 21 Sep 2015 16:49:59 -0400 Subject: [PATCH] render email footer partial --- src/emailer.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/emailer.js b/src/emailer.js index 221c693dab..1187bb4a57 100644 --- a/src/emailer.js +++ b/src/emailer.js @@ -47,10 +47,14 @@ var fs = require('fs'), Emailer.sendToEmail = function(template, email, language, params, callback) { function renderAndTranslate(tpl, params, callback) { async.waterfall([ - function (next) { + function(next) { + app.render('emails/partials/footer' + (tpl.indexOf('_plaintext') !== -1 ? '_plaintext' : ''), params, next); + }, + function(footer, next) { + params.footer = footer; app.render(tpl, params, next); }, - function (html, next) { + function(html, next) { translator.translate(html, lang, function(translated) { next(null, translated); });