Are there open source pop3 java apis that support attach fileretrieve?

A

Amber

The only one I found is Apache commons-net, but it does not support
attach file retrieve.
 
D

Daniel Pitts

Amber said:
The only one I found is Apache commons-net, but it does not support
attach file retrieve.
If you mean decoding attached files, look into Mime and Base64 support
in the java mail package.
 
M

Martin Gregorie

The only one I found is Apache commons-net, but it does not support
attach file retrieve.

JavaMail supports POP3. It retrieves and handles messages containing
attachments.
 
A

Amber

I mean something like this:)

Pop3Connection conn = new Pop3Connection(...)
conn.connect(....)

Message[] msgs = conn.listMessages(...);

for(int i = 0 ; i <msgs.length; i++){

Message msg = msgs;

Attachment atta = msg.listAttaches(...);
atta.saveAsFile(path);

}
 
M

Martin Gregorie

Do you know any sample code using JavaMail to retrieve attachments?
The "JavaMail API Design Specification" Appendix B contains sample code.
The first example shows how to read and display the content of all
messages in a mailbox. This is available for download with the rest of the
package. You'll also want the "API Documentation" package if you don't
have it already.
 
A

Amber

The "JavaMail API Design Specification" Appendix B contains sample code.
The first example shows how to read and display the content of all
messages in a mailbox. This is available for download with the rest of the
package. You'll also want the "API Documentation" package if you don't
have it already.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top