mailbin
v1.0.1
Published
NodeJS client for http://mailb.in
Downloads
3
Readme
Mailbin client
NodeJS client for http://mailb.in
Installation
$ npm install mailbin --save
Or with Yarn
$ yarn add mailbin
Usage
const nodemailer = require('nodemailer');
const mailbin = require('mailbin');
const smtp = nodemailer.createTransport('smtps://username%40gmail.com:[email protected]');
describe('send', function(){
this.timeout(5000);
let bin = mailbin.nextBin('test');
it('should send', () => {
return smtp
.sendMail({
from: '[email protected]',
to: bin.email,
subject: 'Hello!',
text: 'Hello!',
html: '<b>Hello!</b>'
})
.then(() => bin.fetchMessage())
.then(message => {
expect(message.subject).to.be.eql('Hello!');
});
});
});
License
MIT