smtp.office365.com 無法從傳輸連接中讀取數據: net_io_connectionclosed


這幾天發送郵件時突然會報一個錯

無法從傳輸連接中讀取數據:net_io_connectionclosed。

因使用的是 smtp.office365.com

經過查詢,發現了這個

Recently, we started rejecting a percentage of connections to smtp.office365.com that uses TLS1.0/1.1 
for SMTP AUTH (complete disablement will start early 2022).

所以切換到TLS1.2就能夠修復。

附上代碼:

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | 
            SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

 

 

 

參考:https://stackoverflow.com/questions/28362132/office-365-smtp-starts-firing-net-io-connectionclosed

 


免責聲明!

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



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