diff --git a/projects/automate-secret-santa-emails-with-smtp/automate-secret-santa-emails-with-smtp.mdx b/projects/automate-secret-santa-emails-with-smtp/automate-secret-santa-emails-with-smtp.mdx index b7ba97f4..8bb19a05 100644 --- a/projects/automate-secret-santa-emails-with-smtp/automate-secret-santa-emails-with-smtp.mdx +++ b/projects/automate-secret-santa-emails-with-smtp/automate-secret-santa-emails-with-smtp.mdx @@ -135,7 +135,7 @@ Remember to spend 10$-20$ on your gift, but don't stress about it being the perf Let’s break down this code. The parameters taken in to the function are the name of the sender email, receiver email, and name of the recipient. Let’s see how they are used. ```py - password = os.environ('password') + password = os.environ['password'] body_msg = f'''\ From: {sender} Subject: Your Secret Santa Present @@ -218,7 +218,7 @@ import ssl load_dotenv() def send_email(sender, receiver, recipient): - password = os.environ('password') + password = os.environ['password'] body_msg = f'''\ From: {sender} Subject: Your Secret Santa Present @@ -233,7 +233,7 @@ Remember to spend 10$-20$ on your gift, but don't stress about it being the perf names_list = ['Sonny', 'Dharma', 'Malcolm', 'Jerry', 'Asiqur', 'Rose', 'Lillian'] names_and_emails = [ - ['Asiqur', 'asiqur@codedex.io'] + ['Asiqur', 'asiqur@codedex.io'], ['Dharma', 'dharma@codedex.io'], ['Jerry', 'jerry@codedex.io'], ['Lillian', 'lillian@codedex.io'], diff --git a/projects/automate-secret-santa-emails-with-smtp/secret_santa.py b/projects/automate-secret-santa-emails-with-smtp/secret_santa.py index 6999b270..94d58223 100644 --- a/projects/automate-secret-santa-emails-with-smtp/secret_santa.py +++ b/projects/automate-secret-santa-emails-with-smtp/secret_santa.py @@ -7,7 +7,7 @@ load_dotenv() def send_email(sender, receiver, recipient): - password = os.environ('password') + password = os.environ['password'] body_msg = f'''\ From: {sender} Subject: Your Secret Santa Present @@ -22,7 +22,7 @@ def send_email(sender, receiver, recipient): names_list = ['Sonny', 'Dharma', 'Malcolm', 'Jerry', 'Asiqur', 'Rose', 'Lillian'] names_and_emails = [ - ['Asiqur', 'asiqur@codedex.io'] + ['Asiqur', 'asiqur@codedex.io'], ['Dharma', 'dharma@codedex.io'], ['Jerry', 'jerry@codedex.io'], ['Lillian', 'lillian@codedex.io'],