The problem
When I was coding my first twitter bot, I ran into a major issue: I needed to register a new account for the bot, which required me to provide a unique email address.
There was one big issue with that: I had the intention of making multiple bots, just to test the capabilities of the twitter API.
I quickly realized that creating a new email for everyone of those would be really cumbersome and unmanageable after a while.
Making use of "Address Aliasing"
I quickly found out about a neat little trick called "address aliasing". What it does is, allow you to add a "tag" to your email address, without actually changing it.
For Gmail and many other services you simply add a plus sign (+) right before the at (@) and add some text between the plus and at.
That could look as follows:
some.example@gmail.com --> some.example+devto@gmail.com
And that's also what I did for my bot account.
Important things to keep in mind
- If you are using a different provider than Gmail, there may be a different syntax for doing this.
- It won't work for all services, as some built tag checks into their uniqueness check. For me it has worked everywhere I used it.
Top comments (4)
Are there other Email providers who support this
username+whatever@example.com
feature?I give this advice very often and feel bad when people don't use Gmail. Gmail being the market leder, it would be surprising that nobody copy this trick.
From what I have found, at least outlook and icloud support this feature. I think you can just search for "plus addressing ", it should pretty quickly give you an answer.
Thanks that's exactly what I was loooking for
en.wikipedia.org/wiki/Email_addres...
Also nice to mention is that gmails are ignoring dots "." inside the username of the email. For example yourname@gmail.com is the same adress as yo.urn.am.e@gmail.com in gmail, but for third party auth its a new mail.