Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Mail transport for Winston
JavaScript
Tag: 0.2.3

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
changelog.md
package.json
readme.md

readme.md

winston-mail Build Status

A email transport for winston.

Installation

Installing npm (node package manager)

  $ curl http://npmjs.org/install.sh | sh

Installing winston-mail

  $ npm install winston
  $ npm install winston-mail

Usage

  var winston = require('winston');

  //
  // Requiring `winston-mail` will expose 
  // `winston.transports.Mail`
  //
  require('winston-mail').Mail;

  winston.add(winston.transports.Mail, options);

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

  • to: The address(es) you want to send to. [required]
  • from: The address you want to send from. (default: winston@[server-host-name])
  • host: SMTP server hostname (default: localhost)
  • port: SMTP port (default: 587 or 25)
  • username User for server auth
  • password Password for server auth
  • subject Subject for email (default: winston: {{level}} {{msg}})
  • ssl: Use SSL (boolean or object { key, ca, cert })
  • tls: Boolean (if true, use starttls)
  • level: Level of messages that this transport should log.
  • silent: Boolean flag indicating whether to suppress output.
Something went wrong with that request. Please try again.