Skip to content
Snippets Groups Projects
Commit 372040a5 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

Move email recipients into mailer function

parent 078fe247
No related branches found
No related tags found
1 merge request!239Feature/send validation emails
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment