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

Parthiban Sivaji

Greenhorn
+ Follow
since Apr 27, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
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");
folder.open(Folder.READ_ONLY);
// 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
folder.close(false);
store.close();
}
}
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 www.hotmail.com , 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,
Parthiban.
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,
Parthiban
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
Hi,
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