This application reads a CSV file containing names and email addresses, generates personalized email bodies using a template, and sends the emails via Gmail.
- Read contacts from a CSV file
- Personalize email content with names
- Send emails using Gmail SMTP
- Python 3.x
smtplib
library (built-in)csv
library (built-in)- Gmail account for sending emails
-
Clone or Download the Repository:
git clone https://github.com/yourusername/mail-sending-application.git
-
Navigate to the Application Directory:
- Start WSL or open a Linux terminal.
- Change directory to the application folder within the cloned repository:
cd mail-sending-application
-
Prepare Your Data:
- Ensure you have a
contacts.csv
file in thedata
folder with the following format:John Doe,john.doe@example.com Jane Smith,jane.smith@example.com
- Create an
email_template.txt
file in thedata
folder with your email template, including the<NAME>
placeholder:Dear <NAME>, I would like to apply to the open job position at your company. Sincerely, Rob
- Ensure you have a
-
Run the Script:
python3 main.py
The script will read the CSV file and the email template, then prompt you for your Gmail email address and password. It will display the generated email text and ask if you want to send each email.
- This script will prompt for your Gmail password. For security, consider using an app-specific password if you have 2FA enabled. You can generate an app-specific password by following Google's instructions.
This project is licensed under the GPL 3.0 License - see the LICENSE file for details.
Contributions are welcome! Please fork the repository and create a pull request.