Hello All,
In the application I am writing, users register with their email address and password. I am already doing a Regular Expression check on the email address. I would like to validate the email address by checking it with the email server. I found the following code:
// now check host name of email address
string[] host = (email.Split('@'));
string hostName = host[1];
IPHostEntry ipHost = Dns.Resolve(hostName);
IPEndPoint endPoint = new IPEndPoint(ipHost.AddressList[0], 25);
Socket s = new Socket(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
s.Connect(endPoint);
It appears to work, but according to Microsoft, Dns.Resolve is d ...
Go to the complete details ...