0
点赞
收藏
分享

微信扫一扫

IIS 发送邮件提示 Unable to read data from the transport connection: net_io_connectionclosed.

janedaring 2022-01-09 阅读 156

记一次控制台发邮件正常,但是部署到iis上发邮件有一部分邮件能够正常发送,有一部分邮件一直提示:Unable to read data from the transport connection: net_io_connectionclosed. 错误

发件服务器:
smtp.office365.com

解决方案 :
修改传输协议 为 SecurityProtocolType.Tls12

 ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

参考:
Office 365 SMTP starts firing net_io_connectionclosed

TLS 1.2 not negotiated in .NET 4.7 without explicit ServicePointManager.SecurityProtocol call

举报

相关推荐

0 条评论