0.1.0 • Published 11 years ago

mailstream v0.1.0

Weekly downloads
4
License
-
Repository
-
Last release
11 years ago

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();
});