Commit 5422910a authored by Wolfgang Knopki's avatar Wolfgang Knopki
Browse files

Update mailer.js, added NTLM auth

parent b964d60e
const nodemailer = require('nodemailer') const nodemailer = require('nodemailer');
const nodemailerNTLMAuth = require('nodemailer-ntlm-auth');
var env = process.env.NODE_ENV || 'testing'; var env = process.env.NODE_ENV || 'testing';
const config = require('./config')[env] const config = require('./config')[env]
...@@ -8,8 +10,16 @@ var smtpTransport = nodemailer.createTransport({ ...@@ -8,8 +10,16 @@ var smtpTransport = nodemailer.createTransport({
secure: config.mailer.secureConnection, secure: config.mailer.secureConnection,
port: config.mailer.port, port: config.mailer.port,
auth: { auth: {
type: 'custom',
method: 'NTLM',
user: config.mailer.authUser, user: config.mailer.authUser,
pass: config.mailer.authPass pass: config.mailer.authPass,
options: {
domain: 'ad'
}
},
customAuth:{
NTLM: nodemailerNTLMAuth
} }
}); });
...@@ -25,4 +35,4 @@ var mailer = { ...@@ -25,4 +35,4 @@ var mailer = {
options: mailOptions options: mailOptions
} }
module.exports = mailer module.exports = mailer
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment