Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am not able to send email using smpt mailgun or gmail. I am getting the same error as following. Please advice.
Exception in component tSendMail_1 (TestMail)
javax.mail.MessagingException: Could not connect to SMTP host: smtp.mailgun.org, port: 587;
nested exception is:
java.net.ConnectException: Connection refused: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
at javax.mail.Service.connect(Service.java:297)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:98)
at centaur.testmail_0_1.TestMail.tSendMail_1Process(TestMail.java:594)
at centaur.testmail_0_1.TestMail.runJobInTOS(TestMail.java:952)
at centaur.testmail_0_1.TestMail.main(TestMail.java:726)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
... 9 more
I am able to send email now. The antivirus scanner was blocking the mail connection.
I am able to send email now. The antivirus scanner was blocking the mail connection.