Check an Email Address for Validity (VB.NET and VB6)
Category:C#, VB.NET, ASP.NET
Author:Chad M. Kovac
Version Compatibility: Visual Basic 6, Visual Basic 5, Visual Basic.NET
This function, which works in VB5, VB6, and VB.NET will allow you to call CheckEmail("email@example.com") to see if:
- It doesn't contain invalid characters.
- Doesn't have more than one @.
- Has some text prior to the @.
- Has some text after the @.
- Has text between the @ and the "."
- Has text after the last "."
Instructions: Copy the declarations and code below and paste directly into your VB project.