You'll need Python and pip installed. Whatever the latest versions are at the time will do.
- Clone this repository.
- Go to this tutorial by Google and follow the instructions in Step 1 to enable use of the Gmail API in your account (needless to say, you'll need a Google account). After you're done with Step 1, you will have a
credentials.json
file. - Save
credentials.json
at the root of this project. - Populate array in
senders.json
with 1 or more email addresses. - Restore dependencies by running
pip install --upgrade -r requirements.txt
. - Run
python delete_emails_by_sender.py
.