environments {
development {
grails.serverURL = "http://localhost:8080"
}
}
// Some other configuration.
grails {
mail {
host = "smtp.gmail.com"
port = 465
username = "youracount@gmail.com"
password = "yourpassword"
props = ["mail.smtp.auth":"true"]
}
}
I was quiet confused cause I still could read configuration not connected with grails, for instance, log4j settings.
As I discovered later problem lied in fact that using grails { (and open bracket) rewrited all previous settings concerning grails. So one of the correct solution might be:
environments {
development {
grails.serverURL = "http://localhost:8080"
grails.mail.host ="smtp.gmail.com"
grails.mail.port = 465
grails.mail.username = "youracount@gmail.com"
grails.mail.password = "yourpassword"
grails.mail.props = ["mail.smtp.auth":"true"]
}
}
In this case settings are added not rewrited. Don't repeat somebody's mistakes. Enjoy!
Thanks a bunch, I ran into the same problem. Now it works!
ReplyDelete