Gmail App Script as a scheduled task to automatically block all spam emails and domain names.
This is an imperfect tool designed by and coded with the help of ChatGPT to find creative ways to fight spam via Gmail. The ideas was to look for spam/trash messages from people not in my contacts and start adding their domains and email addresses as filters automatically. Of course there are going to be ongoing issues, but since using this script myself, the amount of spam that shows up in my inbox has massively decreased.
The language is pretty simple, feel free to customize and/or make suggestions for improvements.
- Can be custom time triggered to run as often as you want
- Any email in your spam filter will be blocked from future emails
- Check for all emails in the spam folder
- Get both the from email address and it's domain name
- Create New Filter to block all emails from both.
- Move email to trash
- Go to the Google App Script Editor
- https://script.google.com/home/
- Create New Project
- Copy N Paste Script
- Setup Google Authentication so it can access your Gmail Account
- Create Time Triggers to execute this script as often as you wish
- Global Spam List - To help us all block more spam
- Send Data to Spam Reporting Sites - To reduce amount of spam
- Browser Extension