Here's a template for your README.md
file for the Gmail extraction project:
This project is designed to extract Gmail IDs from emails and save them in a CSV format. The script connects to a Gmail account using the IMAP protocol, retrieves email information, and extracts the email IDs to create a CSV file. This project is useful for anyone looking to collect and organize email addresses from their Gmail account efficiently.
- Email Extraction: Extracts email addresses from your Gmail inbox.
- CSV Export: Saves the extracted email IDs into a CSV file for easy access and analysis.
- Filtering: Includes options to filter emails based on specific criteria (e.g., domain names).
- Python 3.x
- Pandas
- IMAPClient
- Email libraries (
email
,imaplib
)
You can install the required libraries using the following command:
pip install pandas imapclient
-
Clone the Repository:
git clone https://github.com/your-username/gmail-extraction-csv.git cd gmail-extraction-csv
-
Set Up Environment:
Make sure you have Python installed. Create a virtual environment and install the necessary libraries:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` pip install -r requirements.txt
-
Configure Gmail Settings:
Before running the script, ensure your Gmail account allows access to less secure apps and IMAP access is enabled.
-
Run the Script:
After setting up, run the script to start extracting emails:
python extract_emails.py
-
CSV Output:
The script will generate a CSV file named
extracted_emails.csv
in the root directory, containing the extracted email addresses.
Here’s an example of the output:
Name | Email ID |
---|---|
suhag.unjiya | [email protected] |
amanjays17 | [email protected] |
notification | [email protected] |
Contributions are welcome! Please fork this repository, make your changes, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for more details.
For any questions or suggestions, feel free to contact me at [email protected]
.
Replace "your-username"
and "[email protected]"
with your actual GitHub username and email address.