You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

mailbin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailbin

NodeJS client for http://mailb.in

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

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:password@smtp.gmail.com');

describe('send', function(){
  this.timeout(5000);

  let bin = mailbin.nextBin('test');

  it('should send', () => {
    return smtp
      .sendMail({
        from: 'username@gmail.com',
        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

FAQs

Package last updated on 01 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts