Misuse of the () function could result in the permament loss of important emails.
Change mac mail settings for gmail code#
This code is provided without any warranty whatsoever-use at your own risk. Here is a Google Apps Script to delete unwanted emails from various labels (folders), which I created based on other sources online.
Change mac mail settings for gmail how to#
Open that project and create a new script file. We’ll show you a few different ways to change the Gmail interface and appearance, including switching back to Classic Gmail (though this may not be possible for everyone), some tips for adjusting the visual appearance of new Gmail to make it appear a bit more like the older version of Gmail, and even a method for how to use a much older simple version of Gmail that has a very simplified.If you are logged in to Gmail, you can go to and create a new Script Project.
Yes, it is possible but it requires you to create a custom Google Apps Script. But even still you'd have to run it with the page open, which kind of makes the filter useless. To automate deletion of the trash at this point would require a userscript to open up the trash folder (using document.querySelector('').click()), clicking the "Empty trash now" button (using document.querySelector('.ya span').click()), then clicking the "Okay" button (using document.querySelector('.Kj-JD-Jl button').click()).
Then you'd have to create a filter (one time under "Settings" -> "Filters and Blocked Addresses" -> "Create new filter") that "Has the words" label:custom-trash older_than:7d with the action Delete it ("Create filter with this search" -> "Okay" -> "Delete it"). You'd have to add a custom label other than clicking the delete button every time (Via the "Labels" button then your custom trash label). You can create your own trash bin that does something similar, but it's kind of a pain and doesn't really do what you want. That includes making the duration shorter or longer. No, there's no way to change the default Gmail trash behavior.