【发布时间】:2016-05-25 14:47:02
【问题描述】:
似乎我已经按照其文档所说的方式尝试了 mail 配置,但我仍然得到:
Error 500: Executing action [x] of controller [x] caused exception: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP
我正在使用 google 应用程序发送电子邮件 - me@dogself.com 正在使用 gmail。我无法让 grails 在我的开发盒上发送测试消息(win 7)。
我的配置是:
host = "smtp.gmail.com"
port = 465
username = "autoresponse@dogself.com"
password = "x"
props = ["mail.smtp.auth":"true",
"mail.smtp.debug":"true",
"mail.smtp.starttls.enable":"true",
"mail.smtp.socketFactory.port":"465",
"mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
"mail.smtp.socketFactory.fallback":"false"]
编辑: 我是否需要某种签名密钥来支持 ssl 连接 到 gmail?
【问题讨论】:
-
您检查过 Windows 防火墙吗?也许是罪魁祸首。
-
刚刚关闭了防火墙 - 结果没有区别仍然拒绝连接:P
标签: email grails jakarta-mail