3

I have a registration form with a freebie gift and people are misusing it by registering as

jo+1@gmail.com
jo+2@gmail.com  

Are there any standard algorithms that I can run on my email records to verify this scenario?

One where I can take jo@gmail.com and invalidate jo+1@gmail.com.

Also I don’t know the other symbols like + that can be used. Maybe .?

Edit: Understand that I potentially might have a million emails in my DB to start with

Quintin Par
  • 15,862
  • 27
  • 93
  • 146

1 Answers1

3

Gmail does not recognize dots in their email addresses. Nor are the addresses case-sensitive.

The plus sign means "ignore everything including and after the +".

So first you want to clean up the email address by stripping out all .s. Then detect if there is a + or not and if there is, strip out everything between the + and the @.

tskuzzy
  • 35,812
  • 14
  • 73
  • 140
  • 1
    That said, this is just how GMail handles addresses. Use of `+foo` tags on addresses is standardized, but different mail systems will treat case and the presence of `.` differently. – Nick Johnson Jun 13 '12 at 07:53