Gmail smtp无法发送电子邮件javax.mail.AuthenticationFailedException:

我已经为不太安全的应用设置了gmail 还要设置IMAP转发

可以在本地发送电子邮件,但是问题发生在

通过IP地址

数字海洋小滴[无ssl或域]

使用Java简单邮件设置电子邮件

private EmailMailer(){
        setMailer(new Mailer(new ServerConfig("smtp.gmail.com",587,EmailConstants.EMAIL_ID,EmailConstants.EMAIL_PASSWORD),TransportStrategy.SMTP_TLS));
    }

经检查的Digital ocean能够连接到587端口

发送邮件时出错

Caused by: javax.mail.AuthenticationFailedException: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbuD
ww-app_1    | 534-5.7.14 ywow3CZ7TbpX5mHNs0LChqgXAsXoucspMfedy2oAIDqjP0MH4RO8M_1bLvhh6f3Ha0Fj_a
ww-app_1    | 534-5.7.14 RhfPx0WlDHIfsXUR8rbVLiSrSAr-hfc0PsOweMs0xMqqhHb6LhXMusyjtsfGzF> Please
ww-app_1    | 534-5.7.14 log in via your web browser and then try again.
ww-app_1    | 534-5.7.14  Learn more at
ww-app_1    | 534 5.7.14  https://support.google.com/mail/answer/78754 a6sm8956026qth.74 - gsmtp
ww-app_1    | 
ww-app_1    |   at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:914)
ww-app_1    |   at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:825)
ww-app_1    |   at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:730)
ww-app_1    |   at javax.mail.Service.connect(Service.java:388)
ww-app_1    |   at javax.mail.Service.connect(Service.java:246)
ww-app_1    |   at javax.mail.Service.connect(Service.java:195)
ww-app_1    |   at org.simplejavamail.mailer.internal.mailsender.MailSender.sendMailClosure(MailSender.java:252)
ww-app_1    |   ... 59 more
demingdiannao1 回答:Gmail smtp无法发送电子邮件javax.mail.AuthenticationFailedException:

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3084806.html

大家都在问