| Submitted On |
September 25, 2003 |
| Updated on |
July 25, 2007 |
| .NET Framework |
1.x |
| Cost |
$199 |
Description
DNS MX Wizard is a class library that lets you query a Domain
Name System(DNS) server for Mail Exchange(MX) Resource Records(RR) and other types of DNS queries. MX
RR's contain the name of the server responsible for handling mail for a
domain. Multiple resource records can exist for any server and each record
has an associated preference level with it which lets you determine which
server to try and communicate with first. You can also use multiple
DNS server's for faster and more robust queries. Most DNS queries are
supported, including the basic IP -> Domain names and Domain Name ->
IP's query and also the Zone Authority information.
This control has many uses, here are some:
- You can write your own SMTP Server and use this to lookup where to
deliver the mail.
- Verify email addresses by looking up the domains MX record and
verifying the email address with the mail server for the domain.
- Verifying and watching to make sure your
companies MX records are correct and haven't been "hacked".
- Pull up Zone Authority Records for a domain
- View all the IP's associated with a domain
The control gives you complete control over the data by letting you
access all the returned MX server, their preference level and
automatically giving you the preferred server. The class
can automatically detect the local machines DNS server and also
allows you to set your own DNS server to use for the lookup.
The
.NET DNS MX Wizard class library has a lot
of power and features built-in. All the code is 100% managed
and does not rely on any external dll's or dependencies. The code is
written to be highl
Syntax Example
The following code example queries a DNS server and obtains the MX records for a domain
using System;
using SeekfordSolutions.DNSMXWizard;
public class MyClass {
public static void Main()
{
DNSClient myDNSClient = new DNSClient("Serial Number");
ArrayList myDNSServers = new ArrayList();
myDNSServers = myDNSClient.GetSystemDNSServers();
myDNSClient.SetServers(myDNSServers);
Console.WriteLine("Performing MX Lookup");
MailExchangeData MXData;
ArrayList myMXList;
try
{
myMXList = myDNSClient.MailExchangeLookup("www.SeekfordSolutions.com");
Console.WriteLine("MX Lookup results:\r\nServer\tPreference\r\n");
for(int iX=0; iX < myMXList.Count;iX++)
{
MXData = (MailExchangeData)myMXList[iX];
Console.WriteLine(MXData.Server.ToString() + "\t" + MXData.Priority.ToString() + "\r\n");
}
}
catch(Exception err)
{
Console.WriteLine(err.Message.ToString());
}
}
}
/*
This code produces the following output:
Performing MX Lookup
MX Lookup results:
Server Preference
64.89.8.154 10
*/
Screenshots
Reviews
Submit a review