I am trying to send emails from a Grails application, but without any success.
I used gmail and another smtp server (without ssl!), But the same error occurs:
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection ?. Failed messages: javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection ?; message exceptions (1) are:
Failed message 1: javax.mail.MessagingException: Exception reading response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
I use in Config.groovy (example for gmail):
grails.mail.host = "smtp.gmail.com"
grails.mail.from = " xxx@gmail.com "
grails.mail.port = "465"
grails.mail.ssl = "on"
grails.mail.username = " xxx@gmail.com "
grails.mail.password = "xxx"
grails.mail.props = ["mail.smtp.auth": "true",
"mail.smtp.socketFactory.port": "465",
"mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory",
"mail.smtp.socketFactory.fallback": "false",
"mail.smtp.starttls.enable": "true",
"mail.debug": "true"]
EDIT: , , Javid Jamae, (3- , , ).
, - , ! , Nimble ( Mail ).
:
Grails: 1.3.4
Groovy : 1.7.4
JVM: 1.6.0_21
jquery - 1.4.2.5
- 0,9
- 1.0.1
- 0.4-SNAPSHOT
:
: , Nimble, NimbleConfig.groovy → mail {... ( "from =..." )}.
, .