Home

Buy Now

Products
  InaAuthenticate
  InaAuthenticate.Net
  InaCalcStd (Free)
  InaCalcPro
  InaCalc.Net
  InaCardCheck
  InaCardCheck.Net
  InaClock
  InaClockCtrl
  InaClockCtrl.Net
  InaCryptCompress.Net
  InaEmailCheck
  InaEmailCheck.Net
  InaEmailSend
  InaFileConverter
  InaGrid
  InaSysTray
  InaUploadFile
  InaXplorer

  XComp (Free)

Support

About

Press Releases
   .Net
   InaAuthenticate
   InaCalc
   InaCardCheck
   InaClock
   InaEmailCheck
   InaEmailSend
   InaGrid
   InaUploadFile

ComponentSource Professional Partner

InaEmailCheck Demo Source


Language=VBScript

Dim strEmail
Dim strCheckDomainOnly
Dim strDomainCount

Dim DNSObject

Dim lErrorCode
Dim strError

strError = ""

If Request.Form.Count > 0 Then

SaveForm()

Else

strEmail = "Someone@AnEmailAddress.Com"
strCheckDomainOnly = "ON"

End If

Sub SaveForm

strEmail = Request.Form("email")
strCheckDomainOnly = Request.Form("CheckDomainOnly")

strEmail = Trim(strEmail)

If strEmail = "" Then

strError = "You must enter an Email address"
Exit Sub

End If

Set DNSObject = CreateObject("InaByte.InaEmailCheck")

DNSObject.TimeOut = 10000

If strCheckDomainOnly = "" Then
        Dim strTempEmail

        strTempEmail = "<" & strEmail & ">"

        lErrorCode = DNSObject.ValidateSyntax(strTempEmail)

        If lErrorCode = 0 Then
                lErrorCode = DNSObject.Verify(strEmail)
        End If
Else
        strDomainCount = DNSObject.Lookup(strEmail).Count

        If strDomainCount = 0 Then
                lErrorCode = -4
        End If
End If

If lErrorCode < 0 Then
        strError = "InaEmailCheck returned an error for this email address! " & lErrorCode
Else
        If lErrorCode > 0 Then
                strError = "InaEmailCheck returned a warning for this email address. " & lErrorCode
        Else
                strError = "InaEmailCheck returned OK"
        End If
End If

strError = strError & " - " & DNSObject.GetErrorString(lErrorCode)

Set DNSObject = Nothing

End Sub


Home Products Support About Press Releases

Copyright © 1996 - 2005 by Inabyte Inc., Novato, California, USA
Last modified: Thursday, October 09, 2003 08:22

Inabyte Inc.
5 Betty Lane
Novato CA 94947
Phone: +1 415 898 7905
Fax: +1 415 898 1652