Performs a DNS lookup on a domain to find the mail exchanger (MX) record.
This can be used as part of an email system, or to validate email domains.
E.g. if a user enters firstname.lastname@example.org, use the component to get the MX record for hotmail.com. If no MX records are returned, it's not a valid e-mail address.
Click here to try it out!
This component is free for non-commercial use. However if you want to use it in commercial (retail or in-house) software
you must purchase a commercial version from here.
By downloading this software you indicate acceptance of these terms and assume all liability relating to it's use.
Register the DLL as normal (using regsvr32), it's then ready for use.
There are only a couple of objects and methods in the component, click here for details.
The core object is MxLookup. This is used to a perform query, which return a collection of host information.
The easiest way to demonstrate is with an example (taken from a test VBS file):
Set mx = createobject("MxLookup.MxLookup")
mx.NameServer = "22.214.171.124"
Set hosts = mx.FindHosts("hotmail.com")
MsgBox hosts.Count & " hosts found"
For Each host In hosts
MsgBox host.preference & " " & _
host.Name & " " & host.IPAddress
Set mx = Nothing
If you'd like the source code, drop me a line at email@example.com.
|v1||First publicly released version|
|v1.2||Added logging (to file %SYSTEM%\mxlookup.log), extra error handling and retries (makes 10 attempts if no response recvd from nameserver)||