Exception to fix javax.mail.AuthenticationFailedException exception

前端 未结 2 488
误落风尘
误落风尘 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 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");
    

提交回复
热议问题