email - Grails mail plugin issues with Gmail SMTP -


i'm using grails mail plugin (2.0.0.rc2) grails 3.0.7. config:

mail:         host: smtp.gmail.com         port: 465         username: myuser@gmail.com         password: mypassword         props:           - mail.debug: true           - mail.smtp.auth: true           - mail.smtp.socketfactory.port: 465           - mail.smtp.socketfactory.class: javax.net.ssl.sslsocketfactory           - mail.smtp.socketfactory.fallback: false 

when try send test mail, following error:

caused by: org.springframework.mail.mailsendexception: mail server connection failed; nested exception javax.mail.messagingexception: not connect smtp host: smtp.gmail.com, port: 465, response: -1. failed messages: javax.mail.messagingexception: not connect smtp host: smtp.gmail.com, port: 465, response: -1     @ grails.plugins.mail.mailmessagebuilder.sendmessage(mailmessagebuilder.groovy:131) ~[mail-2.0.0.rc2.jar:na]     @ grails.plugins.mail.mailservice.sendmail(mailservice.groovy:55) ~[mail-2.0.0.rc2.jar:na]     @ grails.plugins.mail.mailservice.sendmail(mailservice.groovy:59) ~[mail-2.0.0.rc2.jar:na]     @ com.eduspace.classroomcontroller.$tt__index(classroomcontroller.groovy:13) ~[main/:na]     @ grails.transaction.grailstransactiontemplate$2.dointransaction(grailstransactiontemplate.groovy:93) ~[grails-core-3.0.7.jar:3.0.7]     @ grails.transaction.grailstransactiontemplate.execute(grailstransactiontemplate.groovy:90) ~[grails-core-3.0.7.jar:3.0.7]     ... 9 common frames omitted caused by: javax.mail.messagingexception: not connect smtp host: smtp.gmail.com, port: 465, response: -1     @ com.sun.mail.smtp.smtptransport.openserver(smtptransport.java:1972) ~[javax.mail-1.5.1.jar:1.5.1]     @ com.sun.mail.smtp.smtptransport.protocolconnect(smtptransport.java:656) ~[javax.mail-1.5.1.jar:1.5.1]     @ javax.mail.service.connect(service.java:345) ~[javax.mail-api-1.5.1.jar:1.5.1]     ... 15 common frames omitted 

i see no other debug information in logs. have root logger set info, should getting outputted. i've verified can telnet smtp.gmail.com port 465, that's not issue. i've read others have had issues ssl, there's debug information indicating ssl issue , don't that.

i using different config works fine:

grails:     mail:         host: "smtp.gmail.com"         port: 465         username: "<username>@gmail.com"         password: "<password>"         props:             mail.smtp.auth: "true"             mail.smtp.socketfactory.port: "465"             mail.smtp.socketfactory.class: "javax.net.ssl.sslsocketfactory"             mail.smtp.socketfactory.fallback: "false" 

the mail config inside in grails placeholder , not using dashes in example. maybe of you.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -