What All Special Characters In Email Addresses Are Valid?
I just wanted to know what all special characters are allowed and valid for an email address. Can characters like “?” and “-“ be used in part after “@” sign. Please help me with an answer.
I just wanted to know what all special characters are allowed and valid for an email address. Can characters like “?” and “-“ be used in part after “@” sign. Please help me with an answer.
Any email address is composed of three parts: local part, @, and the domain name. The RFC 5322 and RFC 5321 contain all the syntax and definitions. The email address can be valid when created only after these standards are followed. As a whole, the email address cannot be more that 254 characters long.
The local part can be about 64 characters long and can use:
• Alphabets (a-z) and (A-Z)
• Numbers (0-9)
• Special characters: !$#%&’*+-=/?^_{}|~
• A dot “.” character but it should never be the first character or the last character. Multiple dot characters consecutively are not allowed unless quoted. ( “ first….mail”@domain is allowed)
• Characters like “(),:;<>@[]\ and space can be used but only inside a quoted string.
• A backslash should precede any other backslash character or double quote.
• You cannot use @ in local part.
The domain is case insensitive and can use:
o Letters (A-Z) and (a-z)
o Digits (0-9)
o Hyphen (-) but it should not be first or last character