diff --git a/src/registrar/utility/email.py b/src/registrar/utility/email.py index 110ae117e..cb1550801 100644 --- a/src/registrar/utility/email.py +++ b/src/registrar/utility/email.py @@ -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)