Check Valid e-mail address
Hi !
I am developing client application I store client details with e-mail address. but I give permission to users to entry valid e-mail address of every client, In that case I will check valid e-mail address for that how to check the given valid e-mail address please give me a suggestion.
Thanking You
Debasis
Re: Check Valid e-mail address
Found this on the web.
Code:
Try
Dim BB As System.Text.RegularExpressions.Match = System.Text.RegularExpressions.Regex.Match(Me.tbEMailTo.Text, "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)")
If Not BB.Success Then
MessageBox.Show("Please enter a valid EMail address.")
Exit Sub
End If
Catch ex As Exception
End Try
Re: Check Valid e-mail address
You can check for proper fomratting easy enough but that still does not mean it is a valid email address.
For example I could enter [email protected]
As far as I know the only way to insure a valid email is entered is to send a confirmation to the email address and get a reply.