A program to delete trash emails based on keyword and label filters.
npm install -g trash-cleaner
git clone https://github.com/hasankhan/trash-cleaner
cd trash-cleaner
# If you want to try out the development version then 'git checkout dev'
npm install -g
- Create a Google Cloud Platform project with the API enabled.
- Create Authorization credentials for a desktop application and download
gmail.credentials.json
file in theconfig
directory. - Rename
keywords.json.sample
file in theconfig
directory tokeywords.json
and update its contents.
- Register an application with the Microsoft identity platform.
- Rename
outlook.credentials.json.sample
file in theconfig
directory tooutlook.credentials.json
and update its contents. - Rename
keywords.json.sample
file in theconfig
directory tokeywords.json
and update its contents.
To get the list of all parameters type trash-cleaner -h
Usage: trash-cleaner [options]
Options:
-V, --version output the version number
-r, --reconfig reconfigures the auth for a service
-t, --dry-run perform a dry-run cleanup without deleting the emails
-d, --debug output extra debugging info
-l, --launch launch the auth url in the browser
-c, --configDirPath <path> the path to config directory (default: "config")
-s, --service <service> the email service to use (choices: "gmail", "outlook", default: "gmail")
-h, --help display help for command