Solve error javax.mail.AuthenticationFailedException

后端 未结 15 1146
太阳男子
太阳男子 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:17

    I have been getting the same error for long time.

    When i changed session debug to true

    Session session = Session.getDefaultInstance(props, new GMailAuthenticator("xxxxx@gmail.com", "xxxxx"));
    session.setDebug(true);
    

    I got help url https://support.google.com/mail/answer/78754 from console along with javax.mail.AuthenticationFailedException.

    From the steps in the link, I followed each steps. When I changed my password with mix of letters, numbers, and symbols to be my surprise the email was generated without authentication exception.

    Note: My old password was more less secure.

提交回复
热议问题