【问题标题】:Grails Send Mail is not workingGrails 发送邮件不起作用
【发布时间】:2013-07-07 01:02:28
【问题描述】:

我正在使用Mail Plugin 在我的 grails 应用程序中发送电子邮件。我就是这样的……

Config.groovy ----

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

} }

和控制器---

class MailController {
  def mailService

  def sendmail = {
mailService.sendMail {     
    to "example@gmail.com"     
    subject "Hello Fred"     
    body 'How are you?' 
  }
  }

当我尝试发送邮件时。它抛出错误

 URI
   /groovypublish/mail/sendmail
 Class
   sun.security.provider.certpath.SunCertPathBuilderException
 Message
   unable to find valid certification path to requested target

如果我从我的 config.groovy 中删除邮件道具部分。然后发送邮件后,我的页面加载了无限次。

我正在使用 localhost:8080 发送邮件。我知道问题出在 SSL 上。但是我怎样才能避免 SSL 部分。

请帮忙...

【问题讨论】:

  • 从配置中删除 props 以避免 SSL。反卫星。
  • @dmahapatro 当我从配置中删除道具时。我的页面无限次加载。它没有显示任何内容,只是加载...
  • 有谁知道是什么问题???
  • 它的工作,我不知道如何。我改变了我的操作系统到 ubuntu,现在它可以工作了。

标签: grails ssl grails-plugin grails-2.0


【解决方案1】:

我有同样的问题。进入我的病毒扫描程序设置并关闭出站邮件扫描解决了这个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-20
    • 2014-08-25
    • 2017-12-22
    • 1970-01-01
    • 1970-01-01
    • 2016-11-14
    相关资源
    最近更新 更多