0
我在嘗試通過Gmail發送電子郵件時遇到此錯誤。以下是config.groovy文件中的代碼。未通過Gmail發送電子郵件 - 未接受用戶名和密碼
mail.MailMessageBuilder Failed to send email
org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 ca4sm3178528pbd.79 - gsmtp
at grails.plugin.mail.MailMessageBuilder$_sendMessage_closure1.doCall(MailMessageBuilder.groovy:112)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 ca4sm3178528pbd.79 - gsmtp
at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:843)
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:765)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:687)
at javax.mail.Service.connect(Service.java:345)
... 4 more
CODE:
grails {
mail {
host = "smtp.gmail.com"
port = 465
username = "[email protected]"
password = "TTYUIoiuy78"
props = ["mail.smtp.auth":"true",
"mail.smtp.socketFactory.port":"465",
"mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
"mail.smtp.socketFactory.fallback":"false"]
}
}
我試圖從提供的鏈接建議的解決方案。
我登錄並更改了我的密碼。 我打開驗證碼DisplayUnlockCaptcha 我也點擊了allow less secure apps access the app
試試這個HTTP您的應用程序: //www.rocketideas.com/2012/05/gmail-error-password-not-accepted-from-server-solved/ – user1690588 2014-11-14 17:14:24