0.1.0 • Published 11 years ago
mailstream v0.1.0
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();
});
0.1.0
11 years ago