node package manager


An email transport based on mailer for winston.


  $ npm install winston
  $ npm install winston-mailer


  var winston = require('winston');
  // Requiring `winston-mailer` will expose  
  // `winston.transports.Mail` 
  winston.add(winston.transports.Mail, options);

The Mail transport uses mailer behind the scenes. Options are the following:

  • to: The address(es) you want to send to. [required]
  • from: The 'from' address (default: winston@[server-host-name].com)
  • host: SMTP server hostname (default: localhost)
  • port: SMTP port (default: 587 or 25)
  • username User for server auth
  • password Password for server auth
  • level: Level of messages that this transport should log.
  • silent: Boolean flag indicating whether to suppress output.
  • prefix: String for using in as prefix in the subject.
  • maxBufferItems Max errors that will be buffered (default 100)
  • maxBufferTimeSpan Max miliseconds errors will be buffered (default 60000)