aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes How to retrive messages  through proxy?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to retrive messages  through proxy??" Watch "How to retrive messages  through proxy??" New topic
Author

How to retrive messages through proxy??

Madhu Kaparapu
Ranch Hand

Joined: Jul 04, 2005
Posts: 35
Hai to all
I have to retrive list of message from gmail,rediffmail etc,. using pop3 and display the ID and Subject
I am connecting the internet through proxy I can able to send the message,
also retrive the list of message from local mail server but i am not able to retrive messages from gmail,rediffmail etc,. through proxy my program cannot able to find gmail.com or rediffmail.com
I don't know how to set the proxy ip and port to the properties

give the possible solution please


Regards,
Madhu Kaparapu.
Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
How will you authenticate the gmail, yahoo, hotmail servers (POP3 or SMTP) with the valid userid/password?
Madhu Kaparapu
Ranch Hand

Joined: Jul 04, 2005
Posts: 35
Here is the code snippet that will authnticate for usename and password

Session session = Session.getDefaultInstance(props, null);

// Get the store
Store store = session.getStore("pop3");

// Connect to store
store.connect(host, username, password);

// Get folder
Folder folder = store.getFolder("INBOX");

but my program can't able to find the host which i am giving; i have to tell
yuu search through the given proxy ip address for the given host address
Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
For users in local host (local POP3 server) you can manage to get the passwords but what will you do for email ids on different pop3 servers like Yahoo, hotmail whose host info can be obtained but passwords cannot be fetched or obtained.

rgds,

seetesh
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to retrive messages through proxy??