Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaMail :: Accessing Gmail using POP3, SSL

 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I am trying to access my gmail, using the POP3 and SSL.
I am able to connect to the pop server of gmail. When I try to read the content from the Inbox folder, using the code snippet below



Here, both the getMessageCount() and getUnreadMessageCount() methods return a value of "-1".....not sure, as to what is going wrong.

I would really appreciate, if someone can help me out in this regard!!

P.S : I have also tried with folder.getNewMessageCount()...same result
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic