mailstream
v0.1.0
Published
nodejs imap mail stream wrapper
Downloads
12
Readme
mail-stream
nodejs imap mail stream wrapper
Requirements
- node.js -- v0.10.0 or newer
- An IMAP server -- tested with gmail
Installation
npm install mailstreamExample
var MailStream = require('mailstream');
mailstream = new MailStream({
user: '[email protected]',
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();
});
