java.io.InterruptedIOException: Operation timed out: no further information
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Stanley_Loh
Posted On:   Wednesday, January 1, 2003 06:11 PM

I'm trying to retrieve mail from pop server. I've connect to IMAP rather than POP3 as POP3 giving me an error "No provider for pop3". After using IMAP, it seen to be connected to but it having another error which is "java.io.InterruptedIOException: Operation timed out: no further information" Attach is part of my program code. Properties sysProperties = System.getProperties(); Session session2 = Session.getDefaultInstance(sysProperties, null); session2.setDebug(false); Store store = session2.getStore(POP3); store.connect(POP, USERNAME, PASSWORD); Folder folder = store.getDefaultFolder(); if(folder==null)    More>>

I'm trying to retrieve mail from pop server. I've connect to IMAP rather than POP3 as POP3 giving me an error "No provider for pop3". After using IMAP, it seen to be connected to but it having another error which is "java.io.InterruptedIOException: Operation timed out: no further information"



Attach is part of my program code.



Properties sysProperties = System.getProperties();

Session session2 = Session.getDefaultInstance(sysProperties, null);
session2.setDebug(false);



Store store = session2.getStore(POP3);

store.connect(POP, USERNAME, PASSWORD);



Folder folder = store.getDefaultFolder();

if(folder==null)

throw new NullPointerException("No default mail folder");

folder = folder.getFolder("INBOX");

if(folder==null)

throw new NullPointerException("Unable to get folder: " + folder);

folder.open(Folder.READ_WRITE);

totalMessages = folder.getMessageCount();

if(totalMessages==0)

{

out.println(folder + " is empty!
");

folder.close(false);

store.close();

return;

}



Message[] messages = folder.getMessages();

FetchProfile fp = new FetchProfile();

fp.add(FetchProfile.Item.ENVELOPE);

fp.add(FetchProfile.Item.FLAGS);

fp.add("X-Mailer");

folder.fetch(messages, fp);



processMsg(messages);



folder.close(true);

store.close();




Please help. Thank you

   <<Less

Re: java.io.InterruptedIOException: Operation timed out: no further information

Posted By:   John_Zukowski  
Posted On:   Monday, January 6, 2003 05:00 AM

If you have a POP server, you can't connect using IMAP. The POP provider comes with the latest JavaMail code.
About | Sitemap | Contact