100 Days of Code: The Complete Python Pro Boot Camp – Day 32 Project.
Learning sending email using smtplib package.
The program also uses datetime package to retrieve current date/time in order to isolate day and month to compare with birthdays.csv file in root folder and see if there is a match with any of the birthdays.
If there is a match with any of the birthdays, the program will randomly select a birthday wish letter from the letter templates folder. It will replace the [NAME] with name of birthday contact, then send the email to the contact’s email address.
- Choose ‘Open in Replit’
- Select ‘Run’ to use the program
- Change contact information in ‘birthdays.csv’ file (change birthday to today’s date, email to your email address) before running the main.py program