java - grails:无法连接到SMTP主机:*********,端口:25

标签 java email grails

谁能帮助我,我无法从我的应用发送电子邮件,并且出现以下错误。

日志:

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)

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

构建COnfig:
compile ":mail:1.0.7"

希望得到您的慷慨帮助。

谢谢

最佳答案

该错误消息还指向SSL连接。似乎您正在尝试使用标准SMTP TCP连接到SSL端口。这是具有类似错误消息的Stack Over流。

unrecognized ssl message plaintext connection exception

关于java - grails:无法连接到SMTP主机:*********,端口:25,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39590673/

相关文章:

grails - 使Grails Spring Security REST与自定义身份验证提供程序一起使用时出现问题

Java正则表达式排除(非单词字符)

java - 如何根据步数计算速度

java - 提供的 javaHome 似乎无效。我找不到 java 可执行文件。尝试位置 : C:\Program Files\Java\jdk-17\bin\java. exe

java - Android 应用程序因代码错误而崩溃,不理解 logcat 消息

java - 电子邮件回复表明电子邮件打开和收到的时间

grails - 将值设置为隐藏字段

ruby - 将电子邮件组织成线程的算法?

php - 系统抓取邮件

grails - Grails Spring Security Core插件: Controller 不需要身份验证