diff --git a/src/registrar/tests/test_emails.py b/src/registrar/tests/test_emails.py index 2c480cec2..99db0d644 100644 --- a/src/registrar/tests/test_emails.py +++ b/src/registrar/tests/test_emails.py @@ -195,7 +195,7 @@ class TestEmails(TestCase): current_date = datetime.now().strftime("%m%d%Y") current_filename = f"domain-metadata-{current_date}.zip" - response = email.send_email_with_attachment( + email.send_email_with_attachment( sender_email, recipient_email, subject, body, attachment_file, self.mock_client ) # Assert that the `send_raw_email` method of the mocked SES client was called with the expected params diff --git a/src/registrar/utility/email.py b/src/registrar/utility/email.py index 2fb08d10c..35a4ecf03 100644 --- a/src/registrar/utility/email.py +++ b/src/registrar/utility/email.py @@ -51,11 +51,10 @@ def send_templated_email( destination["BccAddresses"] = [bcc_address] try: - if file is None: ses_client.send_email( FromEmailAddress=settings.DEFAULT_FROM_EMAIL, - Destination={"ToAddresses": [to_address]}, + Destination=destination, Content={ "Simple": { "Subject": {"Data": subject},