我该如何在C#中查找邮件服务器的MX记录?
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface adapter in adapters)
{
IPInterfaceProperties properties = adapter.GetIPProperties();
if (properties.DnsAddresses.Count > 0)
foreach (IPAddress ipAddress in properties.DnsAddresses)
dnsServers.Add(ipAddress.ToString(), 53);
}