Search Tools Links Login

A+ Email Verification


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!

Original Author: TinyQuote

Inputs

email address

Assumptions

This calls a web service that is free to use if you only check 1000 or less addresses

Returns

A code that tells how good the address is

Side Affects

Must have MSXML3.0 installed from MSDN on the server you are using ASP on.

Code


<%@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 & "
"
   Case "responsecode"
    emaildata = emaildata & "Code: " & occ.text & "
"
  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
%>


Email Address Checker

<%=status %>


<%=emaildata%>



About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 100 times

Categories

ASP/ HTML

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.