Member-only story
Creating Temporary Gmails Accounts With Python
Generate account — check inbox — read messages — restore Gmail
Sometimes you come across a number of adverts and websites that you need to signup for but don’t completely trust. Temp mail is the most effective solution in this situation. These disposable email addresses replace your original ones and are expired after a certain time limit.
There are a number of online sites and services that help you make a temporary email address, however, in this tutorial, I am going to teach you how to create your own temporary Gmail addresses and receive emails at that address using Python.
Import Libraries
For this tutorial, we will be using only 2 python libraries That are re
and request
. If you don’t have them already installed, use the commands below to install them:
pip3 install request
pip3 install re
And then import them:
import request
import re
Generate Gmail
The very first step is to subscribe to the Temp-Gmail
API via Rapid API (It’s totally free).