Exception to fix javax.mail.AuthenticationFailedException exception

前端 未结 2 487
误落风尘
误落风尘 2021-01-24 06:27

I am learning how to send an email with javamail API, i have created the necessary properties and instructions to send a simple email using SMTP server, and i am using this code

相关标签:
2条回答
  • 2021-01-24 06:48

    First, read this JavaMail FAQ entry about common mistakes. After correcting them, read this JavaMail FAQ entry that tells you how to connect to Gmail. If it still doesn't work, this JavaMail FAQ entry about debugging will help.

    0 讨论(0)
  • 2021-01-24 07:08

    If your email server does not require authentication and you don't want to supply a password (for example, test environment), try this:

    props.put("mail.smtp.auth", "false");
    
    0 讨论(0)
提交回复
热议问题