mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-24 03:30:50 +02:00
merge and lint
This commit is contained in:
commit
ec311b89cf
12 changed files with 749 additions and 132 deletions
|
@ -15,7 +15,7 @@ class EmailSendingError(RuntimeError):
|
|||
pass
|
||||
|
||||
|
||||
def send_templated_email(template_name: str, subject_template_name: str, to_address: str, bcc_address='', context={}):
|
||||
def send_templated_email(template_name: str, subject_template_name: str, to_address: str, bcc_address="", context={}):
|
||||
"""Send an email built from a template to one email address.
|
||||
|
||||
template_name and subject_template_name are relative to the same template
|
||||
|
@ -39,7 +39,7 @@ def send_templated_email(template_name: str, subject_template_name: str, to_addr
|
|||
)
|
||||
except Exception as exc:
|
||||
raise EmailSendingError("Could not access the SES client.") from exc
|
||||
|
||||
|
||||
destination = {"ToAddresses": [to_address]}
|
||||
if bcc_address:
|
||||
destination["BccAddresses"] = [bcc_address]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue