How can I be sure an email address is unique? -


there's pub in town whereby, if sign newsletter using website , provide "unique" email address, free drink. on whim, decided sign second time using myemail+one@gmail.com. let me. i'm sitting on nice comfy pile of free drink vouchers.

this got me thinking system have here, email address considered unique identifier. checking code, sure enough, if offering vouchers in our business, else sitting pretty.

the basic, stab-in-the-dark, fix check "+" character , ignore after (up @), , compare using that. unsure if intent + character. work?

secondly, there other caveats allow user sign multiple times seemingly different email address, end in same mailbox?

this question language-agnostic.

while using plus sign e-mail address alias known feature of gmail, other mailers either not allow or use minus sign instead. '+' legitimate character used part of email address according rfc.

the use of '.' gray area. john.doe@gmail.com , johndoe@gmail.com send both same email address , different.

in order validate uniqueness of email address have prepare rule base application, keep date , still expect surprises...


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -