node-imap
node-imap copied to clipboard
Remove useless mail event with entire that counts entire box as new after openBox
var Imap = require('map');
var imap = new Imap(opts);
imap.once('ready', function() {
imap.openBox('INBOX', true, function(err, box) {
console.log('Got inbox', box.messages.total);
});
});
imap.on('mail', function(new) {
console.log('New mail', new);
});
Before this patch the above code would print out
Got inbox 5052
New mail 5052
# Then when an actual message came in
New mail 1
Now the code above prints
Got inbox 5052
# Then when an actual message comes in
New mail 1
Any updates on this? It seems this is a pretty clean fix to https://github.com/mscdex/node-imap/issues/445, would be really great to merge it in.
@mscdex any chance we could merge this in?