Reputation: 97
I have a problem when I try to use the mail plugin in grails. The ones I've searched in Google are mainly for Grails version 2 mail plugin.
I have tried to setup using
compile 'org.grails.plugins:mail:2.0.0.RC6'
in my buildConfig.groovy
and
sendMail {
to "[email protected]"
from "[email protected]"
subject "This is a test mail"
text "Hello, This is a test mail, how are you?"
}
in one of my controllers functions
When I try to run it, MailConnectException occurred. Have I missed any mail plugin configurations for grails 3 ? or do i have to add something into application.groovy like grails 2 in this site http://grails.asia/grails-mail-plugin-example?
Upvotes: 0
Views: 652
Reputation: 97
I figured it out myself in fact I need to put the mail configuration into application.groovy like in grails 2. And the MailConnectionException is due to high security in Email, therefore, what I did was to set it to allow apps to connect to mail. This is available in security options of Mail system.
Upvotes: 1