简体   繁体   中英

grails : Could not connect to SMTP host: *********, port: 25

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM