Using the + Sign in Email Logins

Most 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.

2 Responses to “Using the + Sign in Email Logins”

  1. Scott Says:

    Another option is to go into your User page in Salesforce.com and change your username without changing your email address. They are 2 separate fields. The username just has to be in an email format.

    Like you, I have several accounts for different dev environments and customer environments, all with the same email address, but different user names. The trick is to change your username to something OTHER than your email address whenever you sign up so that you can sign up again with that email. You could have things like:

    bob.production@example.com
    bob.testinstance@example.com
    bob.customer1@example.com
    bob.customer2@example.com

    Al 4 of those user records can have the same email address on them.

  2. Steve Says:

    I notices what you are talking about yesterday, just after I wrote this article! Most other systems that use email as the username don’t give you this flexibility–thanks for pointing out that Salesforce.com does.

Leave a Reply