我是Grails的新手。 我正在使用邮件1.0插件.. 我配置配置文件如下
grails {
mail {
host = "smtp.gmail.org"
port = 465
username = "myaccount@gmail.com"
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"]
}
}
并在控制器中使用sendMail(),如下所示
sendMail {
to "myanotheraccount@gmail.com"
subject "New User Confirmation"
body "how are u"
}
我没有防火墙问题。 但它显示错误,因为连接拒绝....... ???