div Posted August 20, 2017 Posted August 20, 2017 (edited) There were an error: Could not connect to SMTP host: mail.divyansj.gq, port: 465, response: -1 This is the error shown when my java servlet tries to connect to my mail host.I tried port 25 but still the same. Do i have to request specially for connecting via external servlet or any services? or it isn't supported? Edited August 20, 2017 by div
Luigi123 Posted August 20, 2017 Posted August 20, 2017 This support request is being escalated to our root admin.
div Posted August 22, 2017 Author Posted August 22, 2017 (edited) Does port 587 work? No, it gives an error like this . "There were an error: 535 Incorrect authentication data"My current configuration in eclipse is so any changes you suggest? Do i have to request here specially for connecting via external servlet or any services? or it isn't supported? Edited August 22, 2017 by div
Krydos Posted August 22, 2017 Posted August 22, 2017 Does it work when you use a normal mail client? Like on your phone or something?
div Posted August 23, 2017 Author Posted August 23, 2017 (edited) ya actually it is working on my phone when i configured the mail with outgoing port as 465 and ssl/tls(accept all certificates) username autoreply@divyansj.gq and password for autoreply.So what could be the issue here? it is working with google though..Here's the error in tomcat..(if it helps)javax.mail.MessagingException: Could not connect to SMTP host: mail.divyansj.gq, port: 465, response: -1at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1960)at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)at javax.mail.Service.connect(Service.java:317)at javax.mail.Service.connect(Service.java:176)at javax.mail.Service.connect(Service.java:125)at javax.mail.Transport.send0(Transport.java:194)at javax.mail.Transport.send(Transport.java:124)at net.codejava.email.EmailUtility.sendEmail(EmailUtility.java:47)at net.codejava.email.EmailSendingServlet.doPost(EmailSendingServlet.java:45)at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)at java.lang.Thread.run(Unknown Source) Edited August 23, 2017 by div
wolstech Posted August 23, 2017 Posted August 23, 2017 That's a timeout. Whatever Java server that program is running on needs to be checked to ensure that it has access to the internet over port 465. If it's on your PC, turn off your firewall and see if it works. The fact it works on your phone tells me the SMTP server is not broken.
Recommended Posts