Configure email sender from .env file

This commit is contained in:
Mouse Reeve
2022-01-05 17:35:42 -08:00
parent 69bd9246dd
commit 2fed188862
4 changed files with 10 additions and 2 deletions

View File

@ -69,7 +69,7 @@ def format_email(email_name, data):
def send_email(recipient, subject, html_content, text_content):
"""use a task to send the email"""
email = EmailMultiAlternatives(
subject, text_content, settings.DEFAULT_FROM_EMAIL, [recipient]
subject, text_content, settings.EMAIL_SENDER, [recipient]
)
email.attach_alternative(html_content, "text/html")
email.send()