Sending the email to the following server failed


org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.qq.com:25
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1242)
at org.apache.commons.mail.Email.send(Email.java:1267)
at com.yuyongli.model.test.Test.main(Test.java:32)
Caused by: javax.mail.AuthenticationFailedException: 535 Error: authentication failed, system busy

at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:648)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:583)
at javax.mail.Service.connect(Service.java:313)
at javax.mail.Service.connect(Service.java:172)
at javax.mail.Service.connect(Service.java:121)
at javax.mail.Transport.send0(Transport.java:190)
at javax.mail.Transport.send(Transport.java:120)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232)
... 2 more

當報這個錯誤的時候要考慮四點

1.郵箱的賬號和密碼是否正確

2.email.setHostName("smtp.qq.com");對應的應該是qq賬號而不是163或者126賬號

3.賬號的pop3和imap沒有開通

4.已經開通了pop3和imap但是是剛開通,此時密碼一欄不應該是寫密碼,而是寫你當時開通imap的授權碼。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM