所以我有一个非常基本的脚本:
#region Get Hostname IP
IPAddress[] dnsRecords = Dns.GetHostAddresses(hostname);
string ipHostname = dnsRecords[0].ToString();
if (ipHostname.Length == 0) {
responseCode = imapLoginResponse.Failed;
return false;
}
#endregion
#region Try make a request to the Host, Port
try {