Address variable and wording feedback

This commit is contained in:
Rebecca Hsieh 2024-03-06 15:54:05 -08:00
parent ce98272b48
commit bac44a9814
No known key found for this signature in database
7 changed files with 20 additions and 10 deletions

View file

@ -20,7 +20,12 @@ class EmailSendingError(RuntimeError):
def send_templated_email(
template_name: str, subject_template_name: str, to_address: str, bcc_address="", context={}, file: str = None
template_name: str,
subject_template_name: str,
to_address: str,
bcc_address="",
context={},
attachment_file: str = None,
):
"""Send an email built from a template to one email address.
@ -51,7 +56,7 @@ def send_templated_email(
destination["BccAddresses"] = [bcc_address]
try:
if file is None:
if attachment_file is None:
ses_client.send_email(
FromEmailAddress=settings.DEFAULT_FROM_EMAIL,
Destination=destination,
@ -71,7 +76,7 @@ def send_templated_email(
config=settings.BOTO_CONFIG,
)
response = send_email_with_attachment(
settings.DEFAULT_FROM_EMAIL, to_address, subject, email_body, file, ses_client
settings.DEFAULT_FROM_EMAIL, to_address, subject, email_body, attachment_file, ses_client
)
# TODO: Remove this print statement when ready to merge,
# leaving rn for getting error codes in case