Win a copy of Hello World this week in the Python forum!

Parthiban Sivaji

+ Follow
since Apr 27, 2000
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Parthiban Sivaji

Does Kawa Support Servlets and JSP's
Hi ,
Is there anyone to help me with this code.I took this code from one book.
import javax.mail.*;
import javax.mail.internet.*;
public class GetListExample {
public static void main (String args[]) throws Exception {
String host = args[0];
String username = args[1];
String password = args[2];
// Get session
Session session = Session.getInstance(
System.getProperties(), null);
// Get the store
Store store = session.getStore("pop3");
store.connect(host, username, password);
// Get folder
Folder folder = store.getFolder("INBOX");;
// Get directory
Message message[] = folder.getMessages();
for (int i=0, n=message.length; i<n; i++) {>
System.out.println(i + ": " + message[i].getFrom()[0]
+ "\t" + message[i].getSubject());
// Close connection
The below code is compiling perfectly. It takes three i/p parameters like hostname, user and password. Here which hostname to give . I tried giving , one username and password . I am getting an error saying that Connect failed and NoRouteToHostException.
Is there anything else I should do to read a mail in hotmail through my program. I am inside a proxy server . Could u also tell me how I should give the hostname. I would be thankful if anyone could give me the response at the earliest. My company uses MSExchange Server 5.5. I was not able to connect to it . To which I found out that a patch should be installed in the server.

Thanks in Advance,
19 years ago
Hi Joe,
Thanx for that reply. It is working fine for me now. I had made a silly mistake in my program. I had set the age of the Cookie after adding cookie.
Thanx again,
19 years ago
Hi Joe,
Usage of session object is fine,but I need to see the cookie.txt file in the hard disk. res.addCookie just has the cookie in the memory for that session, if session is closed, cookie is also erased.
19 years ago
How can I set a persistant cookie. I tried using Cookie class setMaxAge method , this is not creating a persistant cookie, when the browser exits this cookie is deleted from the memory.I want to store a cookie file in the client machine. How can I do it ??
19 years ago