From 372040a554eb30c422156797fff2f95ca94e96c3 Mon Sep 17 00:00:00 2001 From: Karel van Klink <karel.vanklink@geant.org> Date: Mon, 29 Jul 2024 13:12:49 +0200 Subject: [PATCH] Move email recipients into mailer function --- gso/services/mailer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gso/services/mailer.py b/gso/services/mailer.py index 760d4c76..c98ae7f8 100644 --- a/gso/services/mailer.py +++ b/gso/services/mailer.py @@ -7,19 +7,18 @@ from ssl import create_default_context from gso.settings import load_oss_params -def send_mail(recipients: str, subject: str, body: str) -> None: +def send_mail(subject: str, body: str) -> None: """Send an email message to the given addresses. Only supports STARTTLS, not SSL. - :param str recipients: The destination addresses, comma separated. :param str subject: The email subject. :param str body: The contents of the email message. """ email_params = load_oss_params().EMAIL msg = EmailMessage() msg["From"] = email_params.from_address - msg["To"] = recipients + msg["To"] = email_params.notification_email_destinations msg["Subject"] = subject msg.set_content(body) -- GitLab