Skip to content

Conversation

@freman
Copy link

@freman freman commented Dec 16, 2014

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

@bengotow
Copy link

Any updates on this? It seems this is a pretty clean fix to #445, would be really great to merge it in.

@jstejada
Copy link

@mscdex any chance we could merge this in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants