Solve error javax.mail.AuthenticationFailedException

后端 未结 15 1079
太阳男子
太阳男子 2020-11-29 05:45

I\'m not familiar with this function to send mail in java. I\'m getting an error while sending email to reset a password. Hope you can give me a solution.

Below is m

相关标签:
15条回答
  • 2020-11-29 06:21

    Just in case anyone comes looking a solution for this problem.

    The Authentication problems can be alleviated by activating the google 2-step verification for the account in use and creating an app specific password. I had the same problem as the OP. Enabling 2-step worked.

    0 讨论(0)
  • 2020-11-29 06:30
    • https://www.google.com/settings/security/lesssecureapps
    • go to your account and turn on the security it will work
    0 讨论(0)
  • 2020-11-29 06:35

    May be this problem cause by Gmail account protection. Just click below link and disable security settings.It will work. https://www.google.com/settings/security/lesssecureapps

    0 讨论(0)
  • 2020-11-29 06:35

    Most of AuthenticationFieldException Error occur when sign-in attempted prevented, login your gmail first and go to https://www.google.com/settings/security/lesssecureapps and check turn on. I solved this kind of problem like this way.

    0 讨论(0)
  • 2020-11-29 06:35
    trying to connect to host "smtp.gmail.com", port 465, isSSL false
    

    You got your gmail smtp setting wrong. Gmail requires SSL. Please see tutorials on how to send email via Java via Gmail SMTP, eg: http://www.mkyong.com/java/javamail-api-sending-email-via-gmail-smtp-example/

    0 讨论(0)
  • 2020-11-29 06:35

    I had this issue as well but the solution had nothing to do with coding. Make sure you are able to connect to gmail. Ping smtp.gmail.com. If you don't get a reply check your firewall settings. It could also be a proxy setting issue.

    0 讨论(0)
提交回复
热议问题