Email id validation
Hee
I have a visual basic form in which the user has to enter his email id.
How can i check if a valid email id is entered by him?
Can anyone please help me in this regard?
Thanks in advance
Indira.
Web Development
Hee
I have a visual basic form in which the user has to enter his email id.
How can i check if a valid email id is entered by him?
Can anyone please help me in this regard?
Thanks in advance
Indira.
by vm
A simplest case is to check syntax id0@id1.id2. More comprehensive is to analyze a program that does the same, e.g. from www.cpan.org:
http://www.cpan.org/modules/by-category/19_Mail_and_Usenet_News/Mail/Mail-CheckUser-1.02.tar.gz
Bye
by indira
by jay eckles
To check the validity of an email address's syntax, check that the string contains only one @ character, that there are one or more characters before the @, and that only valid domain name syntax follows the @.
The part before the @, known as the local-part, can be anything (see RFC 2821, SMTP sec 2.3.10), but it must be at least one character.
The part after the @, known as the domain, must start with a letter or number and contain no other characters except dashes (-) and dots (.). The domain must end with a letter or number (specifically, if it's an internet domain, it must end with a minimum of two letters). Sorry I don't have the specific RFC number available. There are practical limits to the length of the domain part, but I don't think that there is a specified limit.
So to summarize, I would do the following to validate the syntax of an email address:
1. Check for the existence of one and only one @ character
2. Check for one or more characters before the @3. Check for a valid domain after the @, which starts with a letter or number, contains only letters, numbers, dashes (-), and dots (.), and ends with at least two letters preceded by a dot (if you're validating internet-only addresses. Local domains may not end in .xx(x) ).
Jay Eckles
www.jayeckles.com
by indira
by indira
This discussion is closed to new replies.
Sort by Trending