.net发送邮件:服务器响应为: 5.7.0 返回错误解决方式

来源:互联网 发布:浙江卫视台网络直播 编辑:程序博客网 时间:2024/05/02 00:03
.net发送邮件:服务器响应为: 5.7.0 返回错误解决方式
2008-11-29 11:32

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;

Ok.