I'm using POP3 to fetch emails from gmail, I want to fetch a list of folders present in my gmail account but not finding a way of doing it. In IMAP there's a method list("","*") through which we can fetch the folders and then by using select("folder_name") we could fetch the emails.

How to fetch the list of folders via POP3. Please help. Thanks.

有帮助吗?

解决方案

POP3 does not have the concept of folders. It is a very old mail protocol. There is only the Inbox. If you ever see folders on a POP3 client (like in outlook), that is a client side implementation. There are no folders on a POP3 server.

If you need access to the Gmail folders, you need to use IMAP.

hth,
Dave

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top