我正在使用grails插件"mail = 0.9".电子邮件不在生产服务器上发送.它只适用于localhost上的开发环境.
错误如下;
Stacktrace follows:
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:319)
at org.grails.mail.MailService.sendMail(MailService.groovy:63)
at org.grails.mail.MailService.sendMail(MailService.groovy:46)
at org.grails.mail.MailService$sendMail.call(Unknown Source)
at MailGrailsPlugin$_configureSendMail_closure4.doCall(MailGrailsPlugin.groovy:86)
at com.tkxel.chefvivant.api.SommelierController$_closure4.doCall(SommelierController.groovy:107)
at com.tkxel.chefvivant.api.SommelierController$_closure4.doCall(SommelierController.groovy)
at java.lang.Thread.run(Thread.java:636)
Run Code Online (Sandbox Code Playgroud)
谁能帮我?为什么电子邮件不发送?
谢谢
最后,在这个问题上花了很多时间.我修复了这个错误.
实际上问题是即将设置Gmail帐户设置.谷歌正在发送隐藏的验证码,而明显的机器无法识别它.这就是我收到身份验证错误的原因.
解决方案: 我刚刚解锁了Gmail验证码,现在工作正常.
Steps to reproduce this
1. Logout your gmail account first.
2. Visit this url https://accounts.google.com/DisplayUnlockCaptcha and then put username and password to login
3. Press "Continue" button to unlock the captcha
4. It will automatically save the settings.
Run Code Online (Sandbox Code Playgroud)
现在,检查您的应用程序以点击"忘记密码"请求的网址.您必须收到电子邮件.:)
您还可以阅读这篇文章. http://productforums.google.com/forum/#!topic/gmail/uBdBQAuGeTw
谢谢