DEV Community

Discussion on: Automating birthday wishes using Python

_s_w_a_y_a_m_ profile image
Swayam Singh Author

*hey just a quick note: *

If you want to deploy your your app on online servers so that it can run everyday and check for birthdays, you are most welcome BUT
before that make sure you put your email address and passw into the environment variables

Don't expose it in the code

Happy Coding...

ktownrocky profile image

Nice Stuff.
How can i cc other friends when sending email to the friend with bday?.
I tried creating a variable and concatenate and it failed.
line of code:
data = pandas.read_csv("birthday.csv")
to_cc = data['Email'].tolist ### defining cc group
connection.sendmail(from_addr=my_email, to_addrs= [friend["email"]] + to_cc, msg=f"Subject: HAPPY BIRTHDAY Test\n\n{message}")

Ktown Rocky