0

I am getting 555 syntax error in mailfrom

SendData(tcpSocket, string.Format("MAIL From: {0}\r\n", MailFrom));
if (!CheckResponse(tcpSocket, 220))
{
tcpSocket.Close();
return false;
}

is it the problem in my local system because of localhost? Please help me. I am using this code from below link.

http://www.codeproject.com/Articles/5189/End-to-end-Email-Address-Verification-for-Applicat

4

1 回答 1

1

Please don't try to implement your own SMTP client, use the one that comes with .NET: System.Net.Mail.SmtpClient.

Many SMTP servers require TLS, for example, which your code does not account for.

此外,出于安全原因,大多数邮件服务器不会透露RCPT TO一行中的电子邮件地址是否有效。如果一个系统可以肯定地揭示一个地址的存在,那么它就可以被垃圾邮件收集者使用。因此,使用 SMTP 客户端的试运行只能用于验证电子邮件地址(因为有关有效电子邮件地址的复杂规则)。验证(与验证不同的概念)必须通过要求用户回复发送到该地址的电子邮件来手动执行,没有其他方法可以确定。

于 2013-03-30T11:12:31.773 回答