Skip to content

Commit

Permalink
nodemailer: specify path to sendmail
Browse files Browse the repository at this point in the history
  • Loading branch information
tripu committed Jan 8, 2019
1 parent b3ae5d8 commit 7438957
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -820,21 +820,7 @@ module.exports.run = run;
module.exports.app = app;

if (require.main === module) {
console.debug('--- started --- ' + new Date() + ' ---');
// FIXME abstract into configuration the mailer parameters
var transporter = nodemailer.createTransport({sendmail: true, path: '/usr/sbin/sendmail', tls: {rejectUnauthorized: false}});
console.dir(transporter);
const message = {
from: '[email protected]',
to: '[email protected]',
subject: '[Test ' + new Date() + ']',
text: '[Test ' + new Date() + ']',
replyTo: '[email protected]'
};
transporter.sendMail(message, (error, info) => {
if (error)
console.dir(error);
console.dir(info);
});
run(require("./config.json"), transporter);
}

0 comments on commit 7438957

Please sign in to comment.