Automated birthday email sender built with Python
Reads birthdays from a simple CSV file (birthdays.csv). Easy to maintain and update your birthday list.
Sends personalized birthday emails using Gmail SMTP. Set it and forget it!
Randomized templates (letter_1.txt, letter_2.txt, letter_3.txt) for variety in your greetings.
Includes a special romantic birthday message template for your girlfriend.
Robust error handling for missing or invalid data. Won't crash on bad inputs.
Uses Gmail App Password authentication for secure email sending.
Get started by cloning the project to your local machine:
git clone https://github.com/jaymondal45/birthday-mailer.git
cd birthday-mailer
Install the required Python packages:
pip install -r requirements.txt
Set up your Gmail credentials as environment variables. Create a Gmail App Password from your Google Account settings:
export MY_EMAIL="your-email@gmail.com"
export MY_PASSWORD="your-app-password"
Edit birthdays.csv with your contacts' information:
name,email,year,month,day
John Doe,john@example.com,1990,5,15
Jane Smith,jane@example.com,1985,12,25
Edit the letter templates in the letter_templates folder to personalize your birthday messages. Use [NAME] as a placeholder for the recipient's name.
Execute the script to check for birthdays and send emails:
python main.py
๐ก Pro Tip: Set up a cron job (Linux/Mac) or Task Scheduler (Windows) to run this daily automatically!