From 5cfe6e2b37cac2ca30f55872a78955db4da88e0d Mon Sep 17 00:00:00 2001 From: Andreas Krummsdorf Date: Thu, 9 Jul 2015 15:36:37 +0200 Subject: [PATCH] feat(LxMail): do not return new object in configureMail() --- lib/LxMail.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/LxMail.js b/lib/LxMail.js index 9353c73..70d5ade 100644 --- a/lib/LxMail.js +++ b/lib/LxMail.js @@ -75,17 +75,17 @@ module.exports = function (config) { * @param {function} callback The callback function. */ pub.sendMail = function (mail, callback) { - var mailMessage = configureMail(mail, config); + configureMail(mail, config); // add html to text compiler - if (mailMessage.html) { + if (mail.html) { var htmlToText = require('nodemailer-html-to-text').htmlToText; transport.use('compile', htmlToText()); } - debug('Send mail', mailMessage); + debug('Send mail', mail); - transport.sendMail(mailMessage, function (error, result) { + transport.sendMail(mail, function (error, result) { callback(error, result); }); };