Here’s a basic CLI (Command-Line Interface) email search tool written in Python. This script searches for specific keywords in a set of .eml files or plain text files stored in a directory. It displays matching emails along with subject lines and file names.
Features:
-
Searches all files in a given directory
-
Supports keyword matching in subject/body
-
Works with
.emland plain.txtfiles -
CLI arguments for keyword and folder path
Code: email_search_cli.py
How to Use
-
Save the file as
email_search_cli.py -
Run it from your terminal:
This will scan all .eml or .txt files in the specified folder for the keyword “invoice”.
Let me know if you need enhancements like date filtering, sender-based search, or exporting results.
Share this Page your favorite way: Click any app below to share.