I\'ve been trying for days now to send mail from Grails application and unsuccessfully. I\'m using:
in my case, I had to set the property
"mail.smtp.ehlo"
to "false"
(in addition to adding to setting the property "mail.smtp.auth" to "false" which however seems to be the default according to this link)
Before setting "mail.smtp.ehlo" to "false" I saw the following debug output (enabled by setting the property "mail.debug" to "true"):
DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
DEBUG SMTP: mechanism LOGIN not supported by server
DEBUG SMTP: mechanism PLAIN not supported by server
DEBUG SMTP: mechanism DIGEST-MD5 not supported by server
DEBUG SMTP: mechanism NTLM not supported by server
and then getting the same javax.mail.AuthenticationFailedException.
(in this case, the SMTP server was a Microsoft one)