This is a tool to delete mails by senders or domains. We first analyze your mailbox (This process takes time). Once done, we show you the count of mails per sender. You can then mark and select the senders whose mails you want to delete. We also show you a list of links from which you should unsubscribe, to avoid junk mails
- Please take care while marking mails for deletion, mails once deleted cannot be restored. We also recommend you should take a backup of your mails.
- We initially ask for read permissions only, delete permissions will be asked as and when required.
- Using this tool, I reduced the size of my mailbox from 37000+ to 4000 mails
-
Get Gmail token
- Option 1: Get sample token
- Goto https://developers.google.com/gmail/api/quickstart/python
- Click on "ENABLE THE GMAIL API"
- Click "Download client configration"
- Option 2: Create a gmail token
- Goto https://console.developers.google.com
- Create a new project
- Select the project and click on "ENABLE APIS AND SERVICES"
- Search for "Gmail API" and click "Enable"
- Click on "Create Credentails"
- Select "Gmail API", UI Type : "Other UI" and Access : "User Data"
- Click next
- If prompted, click "Create Consent Screen"
- Type Application Name and keep scope public.
- Go to previous tab, type any client id
- Click on done and download the key
- Option 1: Get sample token
-
Copy the token in ./tokens as credentails.json. Delete the existing file.
-
Install the following
- pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
-
Run the script: python CLI.py
- I'll be glad to help, for any doubts please write to abistarun@gmail.com