This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getMessage() of Folder class  RSS feed

 
vasu patnaik
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,



While executing the getMessage() ,no exception is thrown but the rest of the steps is being skipped off, what is the reason for this? can any one throw some light in this regard.

Note ; All these codes are inside a try catch block.

javax.mail.Session session = javax.mail.Session.getInstance(System.getProperties(), null);

javax.mail.Store store = session.getStore("pop3");

store.connect() // connection was made successfully .

javax.mail.Folder folder = store.getFolder("INBOX");

folder.open(Folder.READ_ONLY);

folder.getMessageCount(); // Im able to get the number of messages in the folder

emailMessage = folder.getMessage(EMailIndex);// but here im not able to get the message as well the next lines are skipped of and still no exception is thrown ,i debugged for all those 4 possible exception thrown by this method.

Thanks in advance
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!