用于MS Exchange服务器的Grails邮件插件配置 [英] Grails mail plugin configuration for MS Exchange server
问题描述
我可以使用我的gmail帐户从我的grails应用程序发送电子邮件,但是当我使用MS交换服务器帐户时,我收到这个错误
I am able to send email using my gmail account from my grails application but when I use MS exchange server account I am getting this error
Message: Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.exg6.exghost.com/, 25; timeout -1;
我使用的配置是:
mail {
host = "smtp.exg6.exghost.com"
port = 25
username = "xxxx"
password = "xxxx"
props = ["mail.smtp.auth":"true",
"mail.smtp.socketFactory.port":"25",
"mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
"mail.smtp.socketFactory.fallback":"false"]
我不知道要使用什么配置。我尝试将港口改为465& 993但是没有工作。请帮助
I am not sure what configuration to use. I tried changing port to 465 & 993 but that didn't work too. Please help
推荐答案
我终于得到了这个工作。事实证明,Microsoft提供单独的API / Web服务来发送电子邮件并执行所有其他与邮件相关的操作。该API为开发人员提供了对Exchange Online的编程访问,Exchange Online的一部分以及Exchange Server 2007 Service Pack 1(SP1)的Exchange版本。点击此处了解详情。
I finally got this working. Turns out Microsoft provide a separate API / web-services to send email and perform all other mail related operations. This API gives developers programmatic access to Exchange Online, Exchange Online as part of Office 365, and versions of Exchange starting with Exchange Server 2007 Service Pack 1 (SP1). Click here for details.
exg6.exghost.com是Exchange Server 2007的主机
exg6.exghost.com is host for Exchange Server 2007
我不确定,但我认为Exchange Server 2007及以上t使用SMTP。
And I am not sure but I think Exchange server 2007 and onwards don't use SMTP.
这篇关于用于MS Exchange服务器的Grails邮件插件配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!