0

Can anyone help me with this, I was unable to send email from my app and experiencing below errors.

Logs:

Could not connect to SMTP host: ****.******.** port: 25;

nested exception is:

javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?. Failed messages: javax.mail.MessagingException: Could not connect to SMTP host: smtp.webbfontaine.ci, port: 25;
  nested exception is:

javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: 
Could not connect to SMTP host: ****.******.**, port: 25;
  nested exception is:


javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1986)

at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:656)

at javax.mail.Service.connect(Service.java:345)

at org.springframework.mail.javamail.JavaMailSenderImpl.connectTransport(JavaMailSenderImpl.java:486)

at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:406)

at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:345)

at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)

Here is my grails config:

 grails{
        mail {
            disabled = false
            host = "*****.****.**"
            port = 25
            username = "account"
            password=""
            props = ["mail.smtp.auth":"false",
                     "mail.smtp.socketFactory.port":"25"]
        }
    }

Build COnfig:

compile ":mail:1.0.7"

Hoping for your generous help.

Thanks

Romz
  • 1
  • 4
  • can you telnet to *****.****.** 25 so telnet host 25 from the host that is attempting to send msg - by the way the host is showing in the actual error message above Could not connect to SMTP host: smtp.web.......If you don't have telnet you can use nmapnmap -sS -O -p 25 {hostname} – V H Sep 20 '16 at 10:16
  • @Romz have you tried port number "587" ? – Dipak Thoke Sep 20 '16 at 17:21
  • @vahid, i did telnet it and got this.... 220 mail01.net.******.** ESMTP Sendmail 8.14.4/8.14.4; Wed, 21 Sep 2016 04:17:18 GMT 500 5.5.1 Command unrecognized: "" – Romz Sep 21 '16 at 04:18
  • Usually telnet to the port will open connection on port 25 and await a prompt. As someone has suggested you are attempting to initialise SSL and this appears to be on a non ssl port. So possibly look up configuration for basic port 25 connection (Disabling ssl config) or verify you have smtp on ssl at your end and configure accordingly – V H Sep 21 '16 at 08:02

2 Answers2

0

The error message also points to an SSL connection. Seems like you are trying to connect to an SSL port using standard SMTP TCP. Here is a Stack Over flow that has a similar error message.

unrecognized ssl message plaintext connection exception

Community
  • 1
  • 1
Joe
  • 1,219
  • 8
  • 13
0

Make sure you use correct SSL port number. By default SSL/TLS encrypted SMTP uses port 465.

Armaiti
  • 766
  • 3
  • 11