Automated Birthday Wisher
I decided to use Python to create a automated way of wishing happy birthday.
Now ABW, which is going to send our family or friends a "Happy Birthday" email on their birthday automatically.
Modules: pandas, random, smtplib, datetime Editor: vscode
Steps:
- The first thing to do is to go into this birthdays.csv and update this with some birthdays. So I replaced all the data
- Check if today's date matches a birthday in the birthday CSV.
- if there is a match, so if this if statement is true, then pick a random letter out of letter_1, 2, 3, from our letter templates inside
- Use the replace() method to replace the name placeholder inside each of these letters right here with the actual name of the person whose birthday it is.
- Send the letter which was generated in contents, and send it to that birthday person's email address.
- Create connection using smtplib
- Depending on the email provider pick the correct SMTP, Used "smtp.mail.yahoo.com"
- Login credentials(user, password)
- Send email(user, to_address, msg)