Your silly email parser is not good enough
Read and weep. The originators of the internet have deemed this ( RFC 5321 , 5322 ) to be a valid email address: Address: <(!) "foo;bar,shar!" (woof """) @ (blah; zar, far) +-!~.example.com (???)> Local part: <(!) "foo;bar,shar!" (woof """) > Domain: <+-!~.example.com> Domain is VALID according to RFC 5322 The text inside parentheses are comments. Yes, our forefathers saw it fit to allow email addresses to contain comments. Maybe to include instructions for the postman. The local part is preserved exactly as-is because of the following : "Consequently, and due to a long history of problems when intermediate hosts have attempted to optimize transport by modifying them, the local-part MUST be interpreted and assigned semantics only by the host specified in the domain part of the address." Detailed analysis of the address's structure: Root at 1:1 addr_spec at 1:1 local_part at 1:1 quo