emailjs / emailjs-imap-client

Low-level JS IMAP client for all your IMAP needs.
MIT License
553 stars 122 forks source link

listMessages with byUid not working #188

Closed leeoniya closed 6 years ago

leeoniya commented 6 years ago

hey @felixhammerl

the following does not bring back any messages (Gmail):

client.listMessages('INBOX', '5018,5020,5021,5022', ['uid','internaldate','flags','envelope','RFC822.SIZE','body.peek[]'], {byUid: true}).then(msgs => {
  console.log(msgs);    // empty array?
});

which seems rather odd, since those UIDs definitely exist (i get them in a prior listMessages call: client.listMessages('INBOX', '1:*', ['uid','internaldate']).then(msgs => {...})).

any advice would be appreciated. thanks!

leeoniya commented 6 years ago

never mind, i was closing the connection too early (promise/async related).