diff --git a/app/models/emails.js b/app/models/emails.js index 3c0d1c43d..0a9b195b8 100644 --- a/app/models/emails.js +++ b/app/models/emails.js @@ -50,9 +50,12 @@ const BYTES_15MB = bytes('15MB'); const transporter = nodemailer.createTransport({ streamTransport: true, - buffer: true + buffer: true, + logger: true }); +transporter.logger = logger; + const scanner = new SpamScanner({ logger, clamscan: env.NODE_ENV === 'test' diff --git a/helpers/get-transporter.js b/helpers/get-transporter.js index d9525b2a0..6ba72dded 100644 --- a/helpers/get-transporter.js +++ b/helpers/get-transporter.js @@ -207,7 +207,7 @@ async function getTransporter(connectionMap = new Map(), options = {}, err) { : {}), secure: false, secured: false, - logger, + logger: true, // NOTE: we remap this to our own logger below host: mx.host, port: mx.port, connection: mx.socket, @@ -218,6 +218,9 @@ async function getTransporter(connectionMap = new Map(), options = {}, err) { tls }); + // remap because shared logger does not use logger properly + transporter.logger = logger; + const pool = { truthSource, mx,