Auto delete gmail mails

The eternal quest for a clutter-free inbox!

Gmail offers several ways to automatically delete emails based on various criteria. Here are a few methods:

1. Using Gmail's built-in filters

You can create filters to automatically delete emails that match specific criteria, such as:

To create a filter:

  1. Log in to your Gmail account.
  2. Click on the gear icon () and select "See all settings."
  3. Go to the "Filters and Blocked Addresses" tab.
  4. Click on "Create a new filter."
  5. Enter your filter criteria (e.g., "from:[email protected]" or "subject:unsubscribe").
  6. Select "Delete it" as the action.
  7. Click "Create filter."

2. Using Gmail's "Auto-delete" feature

Gmail offers an "Auto-delete" feature that allows you to automatically delete emails older than a certain number of days. To enable this feature:

  1. Log in to your Gmail account.
  2. Click on the gear icon () and select "See all settings."
  3. Go to the "General" tab.
  4. Scroll down to the "Auto-delete" section.
  5. Select the number of days you want to keep emails (e.g., 30 days).
  6. Click "Save Changes."

3. Using third-party browser extensions

There are several browser extensions available that can help you automatically delete emails in Gmail, such as:

4. Using a script

If you're comfortable with coding, you can use a script to automatically delete emails in Gmail. For example, you can use a Google Apps Script to create a custom function that deletes emails based on specific criteria.

To get started with scripting, follow these steps:

  1. Log in to your Google account.
  2. Go to the Google Apps Script editor.
  3. Create a new script by clicking on "Create" and selecting "Script."
  4. Write your script using the Gmail API.
  5. Save your script and give it a name.
  6. Click on the "Triggers" tab and set up a trigger to run your script at regular intervals.

Remember to always be cautious when using scripts or third-party extensions to delete emails, as they can potentially delete important messages. Make sure to test your filters and scripts thoroughly before enabling them.