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