Flicks FAQ: Prescreen


Prev   Next

Back to the top of the FAQ

PreScreenEmailAddress

The PreScreenEmailAddress method pre-screens an email address, to see if it is syntactically correct.

Syntax

PreScreenEmailAddress(emailToCheck)

Parameters

emailToCheck
The email address to check.

Return Values

Empty if the email address checks out, or an error message. Some error messages are:

  • is empty
  • contains no @ character
  • contains too many @ characters
  • contains an illegal character before the @ character
  • contains an illegal character after the @ character
  • is having a bad hair day (kidding!)
  • has nothing before the @ character
  • has nothing after the @ character
  • has a bad domain name

Example

The following checks an email address


<% Set Mailer = Server.CreateObject("ASPMail.ASPMailCtrl.1") %>
recipient = Request.Form("recipient")
result = mailer.PreScreenEmailAddress(recipient)
%>
<% If  "" = result Then %>

Address seems OK.  Time to use EmailResolver to see if it exists in the real world.

<% Else %>

Email address is not ok, because the email address <%= result %>

<% End If %>


 

Applies To

OCXMail ASP Component

http://www.flicks.com/authentix/discover/main.htm

Back to the top of the FAQ