Skip to content

saulsjam/gmail-inbox-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Gmail Inbox Management

This Python script uses the simplegmail package to mark an email as important or put it in the trash based on the sender's email address. The sender's address is compared to a list of emails that you have saved in a CSV file. The script has you to input an age range for the emails. The script will look for emails older than a given number of days and newer than a given number of days.

Features

  • Marks emails from specific addresses as important
  • Trashes all other emails
  • Counts the number of emails marked as important and trashed

Requirements

  • Python 3.x
  • simplegmail package
  • csv module
  • re module

Installation

  • Install the required packages:

    pip install simplegmail
  • Follow the setup instructions for simplegmail to configure authentication with your Gmail account: simplegmail Setup

Usage

  • Prepare a CSV file (important_addresses.csv) with a header row and a column named email containing important email addresses.

  • Edit the script (very end) to specify the age range of emails to process by modifying the older_than_days and newer_than_days variables.

  • Run the script:

    python mark_emails.py

About

Marks as important or deletes emails in a gmail inbox based on an address book in csv format.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages