Skip to content

Commit

Permalink
feat(LxMail): do not return new object in configureMail()
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Krummsdorf committed Jul 9, 2015
1 parent bf839a7 commit 5cfe6e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/LxMail.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
};
Expand Down

0 comments on commit 5cfe6e2

Please sign in to comment.