C# 发邮件 服务器响应为: 5.7.0 Must issue a STARTTLS command first


The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. d21sm2344514and.26

SMTP 服务器要求安全连接或客户端未通过身份验证。 服务器响应为: 5.7.0 Must issue a STARTTLS command first. i6sm4954143tid.5

今天用Gmail的发送邮件,返回这错误.查了下是因为Gmail要求把ssl加密打开.

加上这代码:client.EnableSsl = true;


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM