Email ID is a very important part of a user account. When an application invites the user to create accounts or allow users to subscribe to a newsletter, they ask for an email ID. Email ID is the initial medium of formal communication, so this is mandatory that the email is received should be in a valid format.
An Email is a string with a very simple structure. There are two parts :
- Domain Name
These two parts are separated by @.
Suppose firstname.lastname@example.org is an email where the first part interviewsortout is Unique User ID at the gamil.com domain.
The length of the unique_id part may be up to 64 characters long and domain name may be up to 253 characters.
The first part of an email may have the following characters :
- May contain Alphabets either in upper case or in lower case.
- Any Digits
- Special character except @
- a dot(.) can not be the first and last character of uique_id
The second part is the domain name. So we can have .com, .in, .info, .net, .au etc type of domain.
Have a look at some valid email addresses:
Now Have a look on Invalid Email Address :
- @not present : [Example.user.com]
- Top Level Domain can not be started with dot ( . ) : [user@.com.my ]
- @user.example.net [ No character before @ ]
- invalid top level domain [email@example.com]
- an email can not start with “.” [ .firstname.lastname@example.org ]
- double dots are not allowed [interview..email@example.com]