Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR Connection refused: Grails email verification using mail plugin

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.......???

like image 513
An Ish A Avatar asked Jan 26 '26 00:01

An Ish A


1 Answers

Probably a configuration issue, have you looked at this example which shows how to use Mailgun via SMTP: https://github.com/jbayer/mail-java

like image 190
Graeme Rocher Avatar answered Jan 27 '26 16:01

Graeme Rocher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!