i am new to Grails. i am using mail 1.0 pluguin.. i configured config file as below
grails {
mail {
host = "smtp.gmail.org"
port = 465
username = "[email protected]"
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"]
}
}
and used sendMail() in controller as below
sendMail {
to "[email protected]"
subject "New User Confirmation"
body "how are u"
}
I have no firewall issues. but it show s error as Connection refused.......???
Probably a configuration issue, have you looked at this example which shows how to use Mailgun via SMTP: https://github.com/jbayer/mail-java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With