1. 程式人生 > >javax.mail.AuthenticationFailedException: failed to connect, no password specified?

javax.mail.AuthenticationFailedException: failed to connect, no password specified?

今天在本地測試定時任務傳送郵件時,控制檯報錯,字母意思是身份驗證有問題。在配置檔案中沒有指定使用者名稱和密碼,郵件伺服器也沒有提供相應的身份驗證方法,所以要設定SMTP協議中的身份校驗 `mail.smtp.auth` 設定`false` ,這時即可傳送正常~
org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: failed to connect, no password specified?