java - Unknown SMTP host -
I am running a Java web application using Tomcat to send users the reports generated via email. I am able to send emails, but after few hours the server stops sending the email with the following error.
javax.mail.MessagingException: Unknown SMTP host: mail.mydomain.co.uk; Nested exception is: java.net.UnknownHostException: com.sun.mail.smtp.SMTPTransport.openServer (SMTPTransport.java:1970) mail.mydomain.co.uk on com.sun.mail.smtp.SMTPTransport.protocolConnect (SMTPTransport java: 642) javax.mail.Service.connect (Service.java:317) javax.mail.Service.connect (Service.java:176)) com on javax.mail.Service.connect (Service.java:125 on .turnkey.email.SendEmail.sendMail on javax.mail.Transport.send0 (Transport.java:194) javax.mail.Transport.send (Transport.java:124) (SendEmail.java:119) on com. mail.mydomain.co.uk on java.net.PlainSocketImpl.connect (PlainSocketImpl.java:195) on java.net: java.net.UnknownHostException: due to turnkey.thread.CommunicationThread.run (CommunicationThread.java:399) . On SocksSocketImpl.connect java.net.Socket.connect (Socket.java:529) to (SocksSocketImpl.java:366) java.net.Socket.connect (Socket.java:478) on com.sun.mail.util.SocketFetcher .createSocket (SocketFetcher.java319) on com.sun.mail.util.SocketFetcher.getSocket (SocketFetche) r.java:233) com.sun.mail.smtp.SMTPTransport.openServer (SMTPTransport.java:1938) ... 8 More on After some time the server starts sending email again.
Can anyone tell me what the problem might be and how can I solve this problem?
Thank you
This looks like your JDK service in your service Unable to view the host name to find the address. Since it works sometimes and with others, it seems that an interim failure of the name service. Name service failure may occur due to some failure in your local operating system, or it may be caused by some network failure that your DNS server or alias service is transmitted to the server, or it fails in the DNS server or name service server Could yourself Determining the exact cause of failure will require some debugging. Note that JDK caches the nameservers' results for some time, so you will need to differentiate your debugging.
Comments
Post a Comment