Change log level

This commit is contained in:
zandercymatics 2023-12-21 10:40:51 -07:00
parent 5c892dcec5
commit bf46be5cbc
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -1,11 +1,13 @@
"""Utilities for sending emails."""
import boto3
import logging
from django.conf import settings
from django.template.loader import get_template
logger = logging.getLogger(__name__)
class EmailSendingError(RuntimeError):
"""Local error for handling all failures when sending email."""
@ -20,7 +22,7 @@ def send_templated_email(template_name: str, subject_template_name: str, to_addr
context as Django's HTML templates. context gives additional information
that the template may use.
"""
print(f"An email was sent! Template name: {template_name} to {to_address}")
logger.info(f"An email was sent! Template name: {template_name} to {to_address}")
template = get_template(template_name)
email_body = template.render(context=context)