If you are looking for a simple FREE web service to use in your asp code to validate and Email address when someone signs up to your mailing list. Check out the script and article here.
code: Can't Copy and Paste this? Click here for a copy-and-paste friendly version of this code!
Terms of Agreement: By using this code, you agree to the following terms... 1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge. 2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws. 3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description. |
' Name: A+ Email Verification ' Description:Will call a webservice that will verify an ' email address down to server level. ' This service is provided for FREE! No costs involved. ' Try it out! By: TinyQuote ' ' Inputs:email address ' Returns:A code that tells how good the address is ' ' Assumes:This calls a web service that is free to use ' if you only check 1000 or less addresses ' ' Side Effects:Must have MSXML3.0 installed from MSDN ' on the server you are using ASP on. ' ' This code is copyrighted
<HTML>
<%@LANGUAGE="VBScript"%>
<%
Dim email
Dim status
Dim emaildata
if Request.Form.Count > 0 Then
' Requires Microsoft XML SDK 3.0 available at msdn.microsoft.com.
' fill data
email = Request.Form("email")
' Call Webservice at CDYNE
Dim oXMLHTTP
' Call the web service To Get an XML document
Set oXMLHTTP = server.CreateObject("Msxml2.ServerXMLHTTP")
oXMLHTTP.Open "POST", _
"http://ws.cdyne.com/emailverify/ev.asmx/VerifyEmail", _
False
oXMLHTTP.setRequestHeader "Content-Type", _
"application/x-www-form-urlencoded"
oXMLHTTP.send "email=" & server.URLEncode(email)
Response.Write oxmlhttp.status
if oXMLHTTP.Status = 200 Then
Dim oDOM
Set oDOM = oXMLHTTP.responseXML
Dim oNL
Dim oCN
Dim oCC
Set oNL = oDOM.getElementsByTagName("ReturnIndicator")
For Each oCN In oNL
For Each oCC In oCN.childNodes
Select Case LCase(oCC.nodeName)
Case "responsetext"
emaildata = emaildata & "CodeTxt: " & occ.text & "<BR>"
Case "responsecode"
emaildata = emaildata & "Code: " & occ.text & "<BR>"
End Select
Next
Next
if status = "" Then status = "OK"
Set oCC = Nothing
Set oCN = Nothing
Set oNL = Nothing
Set oDOM = Nothing
Else
Status = "Service Unavailable. Try again later"
End if
Set oXMLHTTP = Nothing
End if
%>
<HEAD>
<BODY><FORM method="POST" action="">
<P>Email Address Checker<BR>
<INPUT type="text" name="email" size="40" value="<%=email%>"></P><%=status %>
<P><INPUT type="submit" value="Check Email" name="B1"></P>
<P><%=emaildata%></P>
</FORM></BODY>
</HTML> |
|