Search code examples
regexemailemail-validation

Can we include "+" sign as a part of email address?


I was wondering is it a good practice to allow "+" character as a part of email address? I have an app written in Java, and email address with "+" sign get converted to something else when it is parsed (url encode/decode) in the Servlet.


Solution

  • If you're asking whether you should accept it when someone inputs it as their email address, the answer is yes - the use of the + symbol followed by a string is commonly used as an address tag, mail for which will be delivered to the same mailbox as the address without the tag (or with any other tag).

    If you're setting up an email system and want to know if you should allow users to request an address with a + in it, you probably shouldn't, since people may assume that emails with different tags end up in the same user's mailbox.