Fetch emails from gmail from inbox only

698 views Asked by At

When I try to fetch emails from gmail using pop3client library and c# I got all mails not mails in inbox only and in pop3client library there is no method to fetch inbox only, But what I notice that pop3client get messages from All mail folder that contains inbox and sent messages so what I need to know is there way to fetch messages from inbox folder not from All mails folder? or is there way to set inbox mails only in All mail folder in gmail without sent mails by changing settings of gmail? I searched a lot to find solution for these 2 questions without benefits!! I hope to find solution here and thanks in advance :)

1

There are 1 answers

1
jstedfast On BEST ANSWER

POP3 doesn't have a concept of folders. It fetches from whatever storage location the server is configured to use, which, in GMail's case, is the "All Mail" folder, apparently.

Your only alternative to do what you want to do is to switch to using IMAP instead of POP3.