Valid mail address
A valid email address is one that follows the standard format and syntax defined by the Internet Engineering Task Force (IETF) in RFC 5322. Here are the basic rules:
- Local part: The local part is the part of the email address that comes before the
@
symbol. It can contain:- Letters (a-z, A-Z)
- Numbers (0-9)
- Dots (.)
- Hyphens (-)
- Underscores (_)
- The local part must not be empty.
- Domain: The domain is the part of the email address that comes after the
@
symbol. It must:- Contain at least one dot (.)
- Not be empty
- Not start with a dot (.)
- Top-level domain (TLD): The TLD is the part of the domain that comes after the last dot (.) in the domain. It must be one of the following:
- A valid TLD (e.g.,.com,.org,.net, etc.)
- A country-code TLD (e.g.,.us,.uk,.au, etc.)
- Special characters: The following special characters are allowed in an email address:
@
.
(dot)-
(hyphen)_
(underscore)+
(plus sign)=
(equals sign)%
(percent sign)
Here are some examples of valid email addresses:
And here are some examples of invalid email addresses:
@example.com
(no local part)example.com
(no@
symbol)john.doe@
(no domain)john.doe@example
(no TLD)[email protected]
(multiple dots in the domain)
Remember that while these rules define a valid email address, they do not guarantee that the email address actually exists or is in use.