From 58cc1b78e8f86a54b557ef9a44e2b508096720db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Gr=C3=A4sbeck?= Date: Mon, 3 Jun 2024 16:01:01 +0300 Subject: [PATCH] Add docstring to send_email Add docstring to send_email to clarify what the different params are for. Refs EKIR-226 --- app.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app.py b/app.py index a3f5ec9..74519ed 100644 --- a/app.py +++ b/app.py @@ -157,7 +157,20 @@ def feedback(name=None): ) + def send_email(subject, body, reply_to, recipients): + '''Function that sends emails to recipients. + + Args: + subject (str): the subject field of the email message to be sent + body (str): the text body of the email being sent + reply_to (str): The Reply-To header value + recipients (list): List of recipients + + Returns: + bool: Return value is True if message was sent or False if not + ''' + # Prevents duplicates recipients = list(set(recipients)) message = EmailMessage()