Using the + Sign in Email Logins
Tuesday, January 24th, 2006Most applications on the web require that you create a username and password, and many have gone to using an email address as the username. This is nice because it’s easy to remember, but it can be hard if you want to have multiple accounts on one system. To have multiple accounts, you have to come up with multiple email addresses, and they have to be real addresses because there is usually a validation step where they email you something to respond to.
Salesforce.com works this way. Of the 300K+ users on their system, each one has a unique email address. For most of these users, they use their work email and they’re done. I, however, have the problem of needing a login for my organization’s Salesforce.com database, one for my test database, and one on each of my client’s databases. Right now I need 5 accounts in Salesforce.com, which means 5 valid email addresses–a real nightmare.
Good news is that there is a neat trick with email that can get you around this problem. When processing addresses, if a mail system runs into the “+” sign before the “@” sign, it will skip to the “@”, effectively ignoring everything that comes after the “+”.
Example:
Bob@testemail.com looks exactly the same to a mail system as Bob+anything@testmail.com. Email to either of those addresses gets delivered to Bob@testemail.com.
The great thing is that systems like Salesforce.com see those email addresses as different, so Bob can use them as logins that deliver to one real email address, thereby getting past the problem of having to set up multiple “real” email addresses.


