【问题标题】:ERROR Connection refused: Grails email verification using mail plugin错误连接被拒绝:使用邮件插件的 Grails 电子邮件验证
【发布时间】:2014-04-09 02:44:45
【问题描述】:

我是 Grails 的新手。 我正在使用邮件 1.0 插件.. 我配置了如下配置文件

    grails {
        mail {
            host = "smtp.gmail.org"
            port = 465
            username = "myaccount@gmail.com"
            password = "mypassword"
            props = ["mail.smtp.auth":"true",
                    "mail.smtp.socketFactory.port":"465",
                    "mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
                    "mail.smtp.socketFactory.fallback":"false"]
        }
    }

并在控制器中使用 sendMail() 如下

 sendMail {
            to "myanotheraccount@gmail.com"
            subject "New User Confirmation"
            body "how are u"
        }

我没有防火墙问题。 但它显示错误,因为连接被拒绝.......???

【问题讨论】:

    标签: grails groovy grails-plugin


    【解决方案1】:

    可能是配置问题,您是否看过这个展示如何通过 SMTP 使用 Mailgun 的示例:https://github.com/jbayer/mail-java

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-16
      • 1970-01-01
      • 2017-09-01
      • 2018-08-30
      • 1970-01-01
      相关资源
      最近更新 更多