Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.transporter = nodemailer.createTransport(
options.transportOptions
);
}
/**
* Inherit from `winston.Transport`.
*/
util.inherits(Mail, Transport);
/**
* Define a getter so that `winston.transports.Mail`
* is available and thus backwards compatible.
*/
Transport.Mail = Mail;
/**
* Core logging method exposed to Winston. Metadata is optional.
* @param {object} info **Optional** Additional metadata to attach
* @param {Function} cb Continuation to respond to when complete.
*/
Mail.prototype.log = function(info, cb) {
var self = this
let level = info[LEVEL];
if (levels[level] != levels[lowestLevel] && levels[level] >= levels[this.level]){
if(cb) cb(null, true)
return;
}
let body;
let env = (process.env.APP_ENV || "prod").toUpperCase();