mailstream

0.1.0 • Public • Published

mail-stream

nodejs imap mail stream wrapper

Requirements

  • node.js -- v0.10.0 or newer
  • An IMAP server -- tested with gmail

Installation

npm install mailstream

Example

 
var MailStream = require('mailstream');
 
mailstream = new MailStream({
    user: 'CHANGEME@gmail.com',
    password: 'CHANGEME',
    host: 'imap.gmail.com',
    port: 993,
    secure: true
});
 
 
mailstream.on('data', function(mail){
    console.log(mail);
});
 
process.on('SIGINT', function() {
    console.log('\nAbout to exit.');
    mailstream.disconnect();
    console.log('Got mails until '+mailstream.since.format('LLL'));
    process.exit();
});
 
 

/mailstream/

    Package Sidebar

    Install

    npm i mailstream

    Weekly Downloads

    2

    Version

    0.1.0

    License

    none

    Last publish

    Collaborators

    • mawi12345