how to fix the javamail error?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   vidhya_subramaniam
Posted On:   Thursday, May 22, 2003 08:44 AM

I have my program correctly written and it was working fine but since couple of days its giving me an Exception error at run time. I have defined as String host ="omnimail1.omnifax.xerox.com"; String username ="edi"; String password ="ediedi"; // Get session Session session = Session.getInstance( new Properties(), null); // Get the store Store store = session.getStore("imap"); store.connect(host,username,password); The error I am getting is : Exception in thread "main" javax.mail.MessagingException: omnimail1.omnifax.xero x.com; nested exception is: java.net.UnknownHostException: omnima   More>>

I have my program correctly written and it was working fine but since couple of days its giving me an Exception error at run time. I have defined as
String host ="omnimail1.omnifax.xerox.com";
String username ="edi";
String password ="ediedi";

// Get session
Session session = Session.getInstance(
new Properties(), null);

// Get the store
Store store = session.getStore("imap");
store.connect(host,username,password);

The error I am getting is :

Exception in thread "main" javax.mail.MessagingException: omnimail1.omnifax.xero
x.com;
nested exception is:
java.net.UnknownHostException: omnimail1.omnifax.xerox.com
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:303)
at javax.mail.Service.connect(Service.java:233)
at javax.mail.Service.connect(Service.java:134)
at aigemail1.main(aigemail1.java:23)

Can someone please explain why?

Thanks,
Vidhya

   <<Less

Re: how to fix the javamail error?

Posted By:   Simon_Ablett  
Posted On:   Thursday, May 22, 2003 09:43 AM

If this code worked previously then I would say that, at a guess, the mail server you are trying to connect to is no longer accesible (at least not by you).

Regards.
About | Sitemap | Contact