Short of a way to check if an entered emailaddress might be valid, I
resorted to checking if it actually exists:

Function DoesEmailExist ( AnEMailAddress as string)

  dim result as String
  Dim sm as SoapMethod
  dim sr as SOAPResult
   
    // create SOAPMethod and define parameters
    sm = New SoapMethod
     sm.parameter("Email") = AnEMailAddress
    
    // set method properties
    sm.methodNamespace = "http://www.webserviceX.NET";
    sm.action = "http://www.webserviceX.NET/VaidateEmailAccount";
    sm.url = "http://www.webserviceX.NET/ValidateEmail.asmx";
    // execute function
    sr = sm.invoke("VaidateEmailAccount")//their typo "VaidateEmailAccount"
    
    // check for error
    If sr.error = True then
      Beep
      MsgBox "ERROR: " + sr.errorMessage
    else
      // display result
      dim v as Variant
      v=sr.result("Result")
      result=v.StringValue
    end
    
    If sr.error =False then
      if result.BeginsWith("Known User") then//BeginsWith is my own method,
//you might be able to guess what it does
        Return true
      else
        Return False
      end if
    end if
    return False
  // catch exceptions
Exception err as SOAPException
  MsgBox "SOAP Error: " + err.message
  Return false

This takes approximately 10 seconds to run. This might or might not be an
option for you.

-> Maximilian Tyrtania | [EMAIL PROTECTED]
  fischerAppelt Kommunikation GmbH
  Tucholskystr. 18 | D-10117 Berlin | Germany
  Tel. ++49-30-726146-728 | Fax ++49-30-726146-710
  www.fischerAppelt.de
_______________________________________________________________
+++mamamoto, die Initiative von Ligalux für ein neues Familienbild, ist am
10. März in Hamburg gestartet.
Damit Familie wieder sichtbar Spaß macht ­ http://www.mamamoto.de +++
-- 


 
>> On Apr 20, 2006, at 10:02 PM, Thom McGrath wrote:
>> 
>>> Does anybody know of a good mask for an e-mail address (in an
>>> editfield, that is)?


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to