Smtp supertest lib for testing sent mail in your node apps.
$ npm install smtp-supertest
Simply create a new SmtpSupertest()
and start listening:
var SmtpSupertest = require('smtp-supertest');
var smtpSupertest = new SmtpSupertest();
smtpSupertest.listen(8465);
When the smtp-supertest receives mail it will emit a 'email' event and with parsed email object:
smtpSupertest.on('email', function(mail) {
// Assert your mail here
});
(The MIT License)