Messaging exception
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sheeba_PH
Posted On:   Monday, August 12, 2002 06:51 AM

Hi, Am getting following exception while trying to send mail using Java mail API.How to rectify it? Exception in thread "main" javax.mail.MessagingException: Unknown SMTP host: pdc1.nest.stpt.soft.net; nested exception is: java.net.UnknownHostException: pdc1.nest.stpt.soft.net at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:909) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:15 8) at javax.mail.Service.connect(Service.java:233) at javax.mail.Service.connect(Service.java:134) at ListServer.postMail(ListServer.java:230) at ListServer.main(ListServer.java:59) Thanks in advance Sheeba    More>>

Hi, Am getting following exception while trying to
send mail using Java mail API.How to rectify it?

Exception in thread "main" javax.mail.MessagingException: Unknown SMTP host: pdc1.nest.stpt.soft.net;
nested exception is:
java.net.UnknownHostException: pdc1.nest.stpt.soft.net
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:909)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:15
8)
at javax.mail.Service.connect(Service.java:233)
at javax.mail.Service.connect(Service.java:134)
at ListServer.postMail(ListServer.java:230)
at ListServer.main(ListServer.java:59)

Thanks in advance
Sheeba

   <<Less

Re: Messaging exception

Posted By:   Christopher_Koenigsberg  
Posted On:   Monday, August 12, 2002 07:32 AM

Unknown SMTP host: pdc1.nest.stpt.soft.net



Well, is this the exact same hostname you are giving on your command line?



Does this hostname resolve in DNS and/or the local hosts file, on the machine where this code is running?



(do you know how to use tools to resolve a hostname in DNS? depending on what kind of system you are running on, you would use "dig" or "host" or "nslookup" to just query DNS directly, and/or "ping" or "traceroute" or "tracert" etc. if you can't find one of the direct tools, since these secondary tools do the DNS lookup before continuing to try and connect)



Also if you are behind a proxy server and firewall, it may be that you can't resolve the given hostname in the internal DNS at all, because you're just supposed to let the proxy server handle it for you. In that case you'd have to find an SMTP server which you CAN resolve locally.

About | Sitemap | Contact