javax.mail.AuthenticationFailedException: 535 5.0.0 Authentication Failed

℡╲_俬逩灬. 提交于 2019-12-05 03:34:27

I agree with @ Mi Mee . In your username it seems you are taking the incomplete username (That is the reason Authentication failed). For Hotmail you have to enter your Windows Live Id that could be xyz@hotmail.com , qrs@gmail.com etc.

So take in the correct username. And remove @hotmail.com from the from variable. Rest of the code is fine.

535 means bad username or password: see SMTP reply codes

You might need to check your SMTP server's manual to see what 5.0.0 means.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!