私は自分のSMTPクライアントをc#(コンパクトフレームワークで使用するために)作成しています。smtp.gmail.comサーバーを使おうとしています
STARTTLS成功したコマンドの後、smtpクライアントEHLO Command response from server isがempty`を送信した場合。
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);
}