Posted By:
pranjali_bhatia
Posted On:
Saturday, September 21, 2002 12:37 AM
i wrote a prog implementing pop3client..i used store object passing the provider name to connect..i can cnncet using the ip address but when i give the host name as mail.hathway.com as parameter in the connect method , i dont get connected and no exception is thrown. my code is as foloows: Properties props = System.getProperties(); String host = "202.88.149.6"; String username = "sanklan@hathway.com"; String password = "sanklan"; String provider = "pop3"; session = Session.getDefaultInstance(props, null); store = session.getStore(provider); store.connect(host, username, password); if (store.isConnected()) System.out.println(&q
More>>
i wrote a prog implementing pop3client..i used store object passing the provider name to connect..i can cnncet using the ip address but when i give the host name as mail.hathway.com as parameter in the connect method , i dont get connected and no exception is thrown.
my code is as foloows:
Properties props = System.getProperties();
String host = "202.88.149.6";
String username = "sanklan@hathway.com";
String password = "sanklan";
String provider = "pop3";
session = Session.getDefaultInstance(props, null);
store = session.getStore(provider);
store.connect(host, username, password);
if (store.isConnected())
System.out.println("u have successfully logged in");
else
System.out.println("sorry");
it gets connected this way but
kindly tell me how i can connect ny giving thr host name instead of its ip address
<<Less