gpt4 book ai didi

tomcat - 发送带有 grails 应用程序错误的邮件

转载 作者:行者123 更新时间:2023-11-28 22:22:45 25 4
gpt4 key购买 nike

我正在尝试使用邮件插件从我的 Grails 应用程序发送邮件。它适用于开发环境和 gmail smtp 的默认设置。我现在已经在运行 Tomcat 7 的 Windows 服务器上部署了应用程序并尝试通过 Exchange 发送邮件。我收到此错误:

这些是 config.groovy 中的邮件属性:

grails {
mail {
host = "mail.something.com"
port = 25
username = "app@something.com"
password = "xxx"
props = ["mail.smtp.auth":"true",
"mail.smtp.socketFactory.port":"25",
"mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
"mail.smtp.socketFactory.fallback":"false"]
}

javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client

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

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

at grails.plugin.mail.MailMessageBuilder.sendMessage(MailMessageBuilder.groovy:102)

at grails.plugin.mail.MailMessageBuilder$sendMessage.call(Unknown Source)

at grails.plugin.mail.MailService.sendMail(MailService.groovy:39)

at grails.plugin.mail.MailService$sendMail.call(Unknown Source)

at org.helpdesk.RequestController$_closure12.doCall(RequestController.groovy:240)

at org.helpdesk.RequestController$_closure12.doCall(RequestController.groovy)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

我该怎么办?谢谢。

最佳答案

明确说明了什么是错误的:

javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client

您的 Gmail SMTP 设置不适用于 Exchange 服务器。您需要更改设置。只需搜索它。这是一个涉及 Java 邮件和 Exchange 服务器的问题:JavaMail Exchange Authentication您可能对 Java Mail FAQ 中的这个主题感兴趣:http://www.oracle.com/technetwork/java/faq-135477.html#Exchange-login .

关于tomcat - 发送带有 grails 应用程序错误的邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8474329/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com