I am just writing a simple console app to make sure our servers are accepting connections.
When I use
System.Net.IPAddress ipAddress = System.Net.IPAddress.Parse(TEST_SERVER);
System.Net.EndPoint remoteEP = new System.Net.IPEndPoint(ipAddress, SERVER_PORT);
to connect to a server on port 25, should I get the normal response messages that you get when you telnet to port 25?
Also, I don't want to leave the socket hanging open, so I am using this to close the connection:
byte ehlo = Encoding.ASCII.GetBytes("EHLO");
byte quit = Encoding.ASCII.GetBytes("QUIT");
Does this look ok?
Thanks for looking