How to: Validate Strings That Represent E-Mail Addresses (Visual Basic)
The following code example sets a Boolean variable that indicates whether a string represents a valid e-mail address.
Compiling the Code
Call this method by passing the string that contains an e-mail address.
This method validates that e-mail addresses have the form "email@example.com".
Use this code to validate the string before trying to use it as an e-mail address. This could prevent other errors at run time.