0

I am using Mail Plugin to send email in my grails application. I am doing like this ...

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"]

} }

and Controller ---

class MailController {
  def mailService

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

When I am trying to send mail. It throwing ERROR

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

If I remove mail props part from my config.groovy. Then After send mail, my page loaded infinite times.

I am using localhost:8080 to send mail. I know problem is in SSL. But How can I avoid SSL part.

Please help ...

Community
  • 1
  • 1
Free-Minded
  • 5,322
  • 6
  • 50
  • 93

1 Answers1

0

I had the same issue. Going into my virus scanner's settings and turning off outbound mail scanning solved the issue.

Anonymous1
  • 3,877
  • 3
  • 28
  • 42