Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many @ symbol can be in an email address?

Tags:

Is there any rule for having a specified amount of @ symbol in any email id. Just come to my mind if we're to check if an email id is valid or not using PHP.

like image 753
droidlabour Avatar asked Sep 10 '12 16:09

droidlabour


People also ask

Can an email address have multiple symbols?

As far as I'm aware, you can only have one. The @ symbol is the delimiter between the domain name and the address name; multiple @ symbols would very likely confuse the email parser.

How many characters can be in an email address?

In addition to restrictions on syntax, there is a length limit on email addresses. That limit is a maximum of 64 characters (octets) in the "local part" (before the "@") and a maximum of 255 characters (octets) in the domain part (after the "@") for a total length of 320 characters.

Can email addresses have signs?

The short answer is yes, email addresses can include these characters, but with some exceptions. The two biggest factors to consider are hyphen placement and email service provider.


1 Answers

If enquoted multiple @ are allowed. I have to ask why do you need this information. Please please please do not try to write a regex / function or whatever to validate emailaddresses. You have to worry about 3 rfc's (and perhaps 4 if you want to take into account unicode). And you will fail and it will drive you mad.

See my previous answer for more information and a regex you may use if you have an older version of PHP

P.S.

In case someone missed my point: do not try to come up with some validation of your own to validate emailaddresses yourself "ever".

like image 76
PeeHaa Avatar answered Oct 08 '22 18:10

PeeHaa