0.1.5 • Published 9 years ago

nodemailer-delayed-transport v0.1.5

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

Stub transport module for Nodemailer

Applies for Nodemailer v1.0

Stub transport does not send anything, it builds the mail stream into a single Buffer and returns it with the sendMail callback. This is useful for testing the emails before actually sending anything.

Usage

Install with npm

npm install nodemailer-stub-transport

Require to your script

var nodemailer = require('nodemailer');
var stubTransport = require('nodemailer-stub-transport');

Create a Nodemailer transport object

var transport = nodemailer.createTransport(stubTransport());

Send a message

transport.sendMail(mailData, function(err, info){
    console.log(info.response.toString());
});

Events

'log'

Debug log object with {type, message}

'envelope'

Envelope object

'data'

Data chunk

License

MIT