Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading Java Mail

 
Rohit Kedia
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I needed help in finding out this Error.

Except my password I have given all the Details but unable to find out what is the Issue here , this program is unable to connect to Google Mail Server and read all my Emails.

I have also enabled POP3 in gmail settings.




I am always getting this Error, wonder what wrong I am doing.

 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That means you can't connect to the server and port which you specified. That could be because you made an error specifying those things, or because there is a network feature (proxy server, router, firewall) preventing the connection.
 
Rohit Kedia
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I gave "pop.gmail.com" and when I login I give my userid as "arieskeds"

I also checked using ping pop.gmail.com it is pinging.

Is there anything else I need to check.
 
Rohit Kedia
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

If anyone can help me out with this.

Thanks,
 
Ogeh Ikem
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the content of your properties file.
 
Rohit Kedia
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not setting any properties here, do I need to do that ?
I am sorry, I do not know much.
 
Ogeh Ikem
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this code. Replace <username> and <password>


 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also read How do I access Gmail with JavaMail?
 
Rohit Kedia
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried that link too but it says session Timeout also I used the Java Code posted it did not work.

Am I doing something wrong.

Please Please Help Me...
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You've been around the ranch long enough to know that ItDoesntWorkIsUseless.
 
Ogeh Ikem
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The link works on my system. The code also works on my system. What error message are you getting? Do you have the required jars. You need imap.jar and mailapi.jar
 
Alfred Ku
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should be a network problem. Any proxy?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic