mscdex / node-imap

An IMAP client module for node.js.
MIT License
2.17k stars 382 forks source link

How to get emails from sent? #778

Closed venky0195 closed 5 years ago

venky0195 commented 5 years ago

imap.openBox('INBOX') gives you all the emails in the inbox.

If I use imap.openBox('SENT') or imap.openBox('Sent'), i get the reponse as : { "type": "no", "textCode": "NONEXISTENT", "source": "protocol" }

mscdex commented 5 years ago

The mailbox doesn't exist. Verify the name by fetching the list of mailboxes with getBoxes().

venky0195 commented 5 years ago

I got INBOX and Gmail as a result for getBoxes(). How do I access mails in sent?

kael commented 5 years ago

Try: imap.openBox('[Gmail]/Sent Mail').

See IMAP Gmail Extensions.

venky0195 commented 5 years ago

Thank you

venky0195 commented 5 years ago

Can you please post an example of how to use imap.thread()?

venky0195 commented 5 years ago

I want to get a conversation in a thread

kael commented 5 years ago

You'd rather ask on StackOverflow, and get a look a previous asked questions. Or read the doc (See the thread function).