(Classic ASP) MX Lookup Mail Server Domain by Email Address
How to find the mail server for a given email address. Returns the domain name of the primary mail server.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.MailMan")
set mailman = Server.CreateObject("Chilkat.MailMan")
mxDomain = mailman.MxLookup("support@chilkatsoft.com")
If (mailman.LastMethodSuccess <> 1) Then
Response.Write "<pre>" & Server.HTMLEncode( mailman.LastErrorText) & "</pre>"
Response.End
End If
Response.Write "<pre>" & Server.HTMLEncode( "MX Domain: " & mxDomain) & "</pre>"
%>
</body>
</html>
|