amit chadha
amit chadha

Reputation:

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.

Upvotes: 1

Views: 1609

Answers (3)

ordnungswidrig
ordnungswidrig

Reputation: 3186

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.

Upvotes: 0

Jimmy Stenke
Jimmy Stenke

Reputation: 11220

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).

Upvotes: 5

Jeroen van Bergen
Jeroen van Bergen

Reputation: 1046

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

Upvotes: 0

Related Questions