VB icon

A+ Email Verification

Email
Submitted on: 1/6/2015 1:40:00 AM
By: TinyQuote (from psc cd)  
Level: Beginner
User Rating: By 8 Users
Compatibility: ASP (Active Server Pages)
Views: 1625
 
     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!
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
'**************************************
' 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 (from psc cd)
'
' 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.
'**************************************

<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>


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.