aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Reading Java Mail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Reading Java Mail" Watch "Reading Java Mail" New topic
Author

Reading Java Mail

Rohit Kedia
Ranch Hand

Joined: Apr 24, 2010
Posts: 79
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
Bartender

Joined: Oct 14, 2005
Posts: 18115
    
    8

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

Joined: Apr 24, 2010
Posts: 79
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

Joined: Apr 24, 2010
Posts: 79
Hi,

If anyone can help me out with this.

Thanks,
Ogeh Ikem
Ranch Hand

Joined: May 13, 2002
Posts: 180
What is the content of your properties file.
Rohit Kedia
Ranch Hand

Joined: Apr 24, 2010
Posts: 79
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

Joined: May 13, 2002
Posts: 180
Try this code. Replace <username> and <password>


Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

Also read How do I access Gmail with JavaMail?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Rohit Kedia
Ranch Hand

Joined: Apr 24, 2010
Posts: 79
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
Marshal

Joined: Mar 22, 2005
Posts: 39541
    
  27
You've been around the ranch long enough to know that ItDoesntWorkIsUseless.


Ping & DNS - updated with new look and Ping home screen widget
Ogeh Ikem
Ranch Hand

Joined: May 13, 2002
Posts: 180
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

Joined: Jul 30, 2010
Posts: 6
It should be a network problem. Any proxy?


Regards, Alfred Ku
SCJP, SCWCD, SCBCD, SCEA, MCSE, MCSA, MCDBA, OCA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading Java Mail
 
Similar Threads
javax & gmail
Matching mail message with UUID
How to retrieve mails from POP 3 server
POP3 JavaMail Client-How to Read Unread Mails only
JavaMail: Help with sending e-mails