mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-11 23:14:49 +02:00
Change log level
This commit is contained in:
parent
5c892dcec5
commit
bf46be5cbc
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue