Tutorial :getting drafts and sent items in Java using pop3


I am facing a problem regarding getting the drafts and sent mail folder programmaticaly in Java. Although I am able to get the inbox using pop3 and able to send mail via smtp, I am not able to get it done by pop3. Thanks in advance for your reply.


The POP3 Protocol doesn't support folders at all, so the only one you can get is the INBOX.

All the other folders are stored locally within each POP3 client, so if you are writing one, you are free to do that in whatever way you like.

There might be POP3 servers that allow use of folders through extensions, but in that case they are not following the standard protocol and you will most likely implement something own or try to find some package specific for that mailserver.

If you want to use server-side folders in a standardized way, I suggest you look at IMAP. Most mail-providers do support both POP3 and IMAP and it supports storing folders on the server (including Drafts, Sent mail, and other customized folders).


When I look at this I would say that the standard POP3 protocol implementation provided with JavaMail does not support this.


POP3 does not supports the notion of differents folder. If the mail server supports IMAP then you'd be able to access all folders. The IMAP support in JavaMail is decent and easy to use.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »