node-mail-listener
v1.7.4
Published
Listens to mails from defined senders and executes code in a callback
Downloads
8
Readme
var callback = function(mail) {
console.log('- FROM : ' + mail.from[0].address);
console.log(' SUBJECT : ' + mail.subject);
console.log(' DATE : ' + Date());
console.log(' BODY : ' + mail.text);
};
var mailInfos = [{
login: 'login',
pass: 'pass',
imap: 'imap',
}];
var whitelist = ['*@gmail.com', '[email protected]'];
require('node-mail-listener')(mailInfos, whitelist, callback);