0
votes

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 = "[email protected]"
 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 "[email protected]"     
    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 ...

1
Remove props from the configuration to avoid SSL. ASAT. - dmahapatro
@dmahapatro when i remove props from the configuration. My page is loading infinite times. Its not showing anything only loading... - Free-Minded
Anybody knows whats the problem ??? - Free-Minded
Its working, I don't know how. I changed my O.S. to ubuntu and now its working. - Free-Minded

1 Answers

0
votes

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