From e996cf6af74c13496616c53cfdb8db132fa5cc25 Mon Sep 17 00:00:00 2001 From: Anjalisharma8072 Date: Wed, 23 Oct 2024 00:58:34 +0530 Subject: [PATCH 1/3] replace()with[] --- .../automate-secret-santa-emails-with-smtp.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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..51a068e3 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 From 33817aacbbd90693219ca933f5818b7a3cfc3d18 Mon Sep 17 00:00:00 2001 From: Anjalisharma8072 Date: Sun, 27 Oct 2024 08:26:05 +0530 Subject: [PATCH 2/3] fix typo and added comma --- .../automate-secret-santa-emails-with-smtp.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 51a068e3..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 @@ -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'], From daa8edc9756d1e85cce5cabc6bc4718d5fa2be07 Mon Sep 17 00:00:00 2001 From: Anjalisharma8072 Date: Wed, 30 Oct 2024 10:02:11 +0530 Subject: [PATCH 3/3] updated file --- .../automate-secret-santa-emails-with-smtp/secret_santa.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'],