Я получаю следующую ошибку:
ERROR
org.springframework.mail.MailSendException: Failed messages:javax.mail.MessagingException: can't determine local email address; message exceptions (1) are:
Failed message 1: javax.mail.MessagingException: can't determine local email address
CONFIG
grails.mail.host = "xx.xx.com"
grails.mail.port = 25
grails.mail.from = "xx@xx.com"
grails.mail.username = "xx@xx.com"
grails.mail.password = "xxx"
grails.mail.props = ["mail.smtp.auth": "true",
"mail.smtp.socketFactory.port": "25",
"mail.smtp.socketFactory.fallback": "false"]
КОД
try {
sendMail {
to "${params.emailTo}"
subject "${params.emailSubject}"
body "${params.emailMessage}"
}
}
catch (Exception e) {
println e
}