๐ŸŽ‚ Birthday Mailer

Automated birthday email sender built with Python

๐Ÿ Python 3.10+ ๐Ÿ“ง Gmail SMTP ๐ŸŽจ Multiple Templates ๐Ÿ’– Special Messages

โœจ Features

๐Ÿ“… CSV Integration

Reads birthdays from a simple CSV file (birthdays.csv). Easy to maintain and update your birthday list.

๐Ÿ“จ Automated Emails

Sends personalized birthday emails using Gmail SMTP. Set it and forget it!

๐ŸŽจ Multiple Templates

Randomized templates (letter_1.txt, letter_2.txt, letter_3.txt) for variety in your greetings.

๐Ÿ’– Special Messages

Includes a special romantic birthday message template for your girlfriend.

โœ… Error Handling

Robust error handling for missing or invalid data. Won't crash on bad inputs.

๐Ÿ”’ Secure Authentication

Uses Gmail App Password authentication for secure email sending.

๐Ÿ“ธ Screenshots

CSV File

Birthday CSV File

Terminal Output

Program Running

Letter Template

Birthday Letter Example

๐Ÿš€ Quick Setup

1 Clone the Repository

Get started by cloning the project to your local machine:

git clone https://github.com/jaymondal45/birthday-mailer.git cd birthday-mailer

2 Install Dependencies

Install the required Python packages:

pip install -r requirements.txt

3 Configure Gmail App Password

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"

4 Add Birthday Data

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

5 Customize Templates

Edit the letter templates in the letter_templates folder to personalize your birthday messages. Use [NAME] as a placeholder for the recipient's name.

โ–ถ๏ธ Run the Bot

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!