我正在编写自己的SMTP客户端c#(用于紧凑型框架)。尝试使用smtp.gmail.com服务器
如果客户端发送空`,则在成功STARTTLS命令后。smtpEHLO Command response from server is
message = "EHLO 10.192.4.223\r\n";
Write(message);
response = Response();
if (response.Substring(0, 3) != "250")
{
throw new SmtpException(response);
}
message = "STARTTLS\r\n";
Write(message);
response = Response();
if (response.Substring(0, 3) != "220")
{
throw new SmtpException(response);
}
message = "EHLO 10.192.4.223\r\n";
Write(message);
response = Response();
if (response.Substring(0, 3) != "250") //empty response
{
throw new SmtpException(response);
}