const nodemailer = require('nodemailer') const nodemailerNTLMAuth = require('nodemailer-ntlm-auth') var env = process.env.NODE_ENV || 'testing' const config = require('./config')[env] var smtpTransporter = nodemailer.createTransport({ host: config.mailer.host, secure: config.mailer.secureConnection, port: config.mailer.port, requireTLS: config.mailer.TLS, auth: { type: 'custom', method: 'NTLM', user: config.mailer.authUser, pass: config.mailer.authPass, options: { domain: 'ad' } }, customAuth:{ NTLM: nodemailerNTLMAuth } }); var mailOptions:any = { to: "", cc: "", from: config.mailer.from, subject: "", text: "", html: "" } var mailer:any = { transporter: smtpTransporter, options: mailOptions } export = mailer