java 使用qq邮箱发送邮件报错 port: 465, response: 550 错误
生活随笔
收集整理的這篇文章主要介紹了
java 使用qq邮箱发送邮件报错 port: 465, response: 550 错误
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
項目中使用到qq郵箱進行批量發送郵件的經常會報如下的錯誤:
javax.mail.MessagingException: Could not connect to SMTP host: smtp.qq.com, port: 465, response: 550at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1960)at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)at javax.mail.Service.connect(Service.java:295)at javax.mail.Service.connect(Service.java:176)或者這樣的錯誤:
com.sun.mail.smtp.SMTPSendFailedException: 550 Mail content denied. http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000726或者:
javax.mail.MessagingException: Could not connect to SMTP host: smtp.qq.com, port: 465, response: -1大多是因為一段時間內發送郵件太頻繁,導致被qq郵箱服務器拒絕連接了,使用定時任務或者多線程同時發送多封郵件經常會遇到這個問題
可嘗試以下連接的解決方案:
https://blog.csdn.net/baidu_34211956/article/details/83544631
或者等待一段時間后再發送
騰訊官方幫助文檔解釋如下:
https://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000722
https://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000726
總結
以上是生活随笔為你收集整理的java 使用qq邮箱发送邮件报错 port: 465, response: 550 错误的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: J2ME 访问JAR和JAD文件中的属性
- 下一篇: web项目调用qq临时会话功能实现方法