Product Logo

SMTPit Pro

A Feature-rich Email plug-in

Functions

SMTPit_VerifyEmailAddress

NameSMTPit_VerifyEmailAddress
Description

You can use this function to verify the syntax of an email address to see if it “looks” correct. You can also verify the email address against its host server to see if it is valid.

Note: The “Server Verification” feature of this function should be used with caution and at your own risk. There is only one method for doing this sort of verification, and it has unfortunately been abused by “spammers”. For this reason, most mail servers have disabled this sort of verification, or if they have not disabled it, they have added some security to blacklist computers that constantly attempt to verify email addresses. So, to keep yourself from being blacklisted, it would be a good idea to only verify an email address once, or at the very most, only verify an email address every month or two. You should also keep in mind that if this function returns an error, it does not necessarily mean that the email address is invalid. It could simply mean that the mail server has disabled this sort of verification.

Return TypeText
FormatSMTPit_VerifyEmailAddress ( CheckType ; EmailAddress ; Timeout )
Required Parameters
CheckType

The type of Verification Check to do. (Specify “Syntax” to check to see if the EmailAddress “looks” like an email address; this is the Default. Specify “Server” to Verify the email address against its host server.)

EmailAddress

The Email Address to Verify.

Optional Parameters
Timeout

The number of seconds to wait before giving up when doing a Server Verification. (The ‘Connection Timeout’ setting in the Configuration Dialog is the Default Setting.)

Examples
Example 1

Verified. sales@mydomain.com

SMTPit_VerifyEmailAddress( "Syntax" ; "sales@mydomain.com" )
Example 2

ERROR: VerifyEmailAddress: Email failed syntax check. (It doesn't "look" like an email address.)

SMTPit_VerifyEmailAddress( "Syntax" ; "sales@mydomaincom" )
Example 3

ERROR: VerifyEmailAddress: SendRcptToCmd: Mail Server Error: unrouteable address

SMTPit_VerifyEmailAddress( "Server" ; "sales@mydomain.com" )