How do you normalize an email address in PHP? -
Is PHP a function that can normalize an email address?
Example, if case isn 'is not important, then FOO@example.com
-> foo@example.com
.
I do not want the rule for an email address to be "similar", so I do not want to apply it myself.
Wikipedia has one
Despite what other people have said Email may be case sensitive
Local-part case is sensitive, so "jsmith@example.com" and "JSmith@example.com" different people Can be distributed to. This practice has been discouraged by RFC 5321. However, the only official mail server for the domain can make this decision The only exception is for a local part value of "postmaster", which is insensitive to the case, and to be forwarded to the administrator of the server needed.
The local part is referring to the part of the address @ on the left side of the sign @
Therefore, as far as your specific concern (case generalization) To the right), however you look best fit (split by @, server component StraTolver, recombinant).
Comments
Post a Comment