A simple python package to extract sender emails from a list of eml files.
Recently, I found myself in a situation where I have to prepare a spreadsheet for all the emails in the inbox of the company Gmail account. I was provided with eml files of inbox emails. Instead of manually extracting thousands of emails, I have decided to write a python script to automate the process.
|-- inputs/
| |-- /emails (input eml files)
| |-- /restricted_emails.csv (emails to be excluded)
|-- outputs/
| |-- emails.csv (output csv file)
|-- src/
| |-- extractor/
| | |-- __init__.py
| | |-- extractor.py
| | |-- util.py
| |-- main.py
-
Clone the repository by running the following command:
git clone https://github.com/hifarhanali/zoho-email-extractor.git
-
Change directory to the root directory of the repository:
cd zoho-email-extractor
-
Install the dependencies by running the following command:
pip install -r requirements.txt
-
Run the main.py file by running the following command:
python src/main.py -i path/to/eml_files -o path/to/output_dir --output_filename name_of_output_file --restricted_emails_path path/to/restricted_emails.csv
e.g.
python src/main.py -i ./inputs/emails -o ./outputs/ --output_filename emails.csv --restricted_emails_path ./inputs/restricted_emails.csv
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Farhan Ali - @hifarhanali - [email protected]
Project Link: https://github.com/hifarhanali/zoho-email-extractor