mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
Merge branch 'master' into capture-delivery-outcomes
Conflicts: tests/app/notifications/test_rest.py
This commit is contained in:
@@ -52,6 +52,7 @@ class AwsSesClient(EmailClient):
|
||||
to_addresses,
|
||||
subject,
|
||||
body,
|
||||
html_body='',
|
||||
reply_to_addresses=None):
|
||||
try:
|
||||
if isinstance(to_addresses, str):
|
||||
@@ -61,6 +62,15 @@ class AwsSesClient(EmailClient):
|
||||
elif reply_to_addresses is None:
|
||||
reply_to_addresses = []
|
||||
|
||||
body = {
|
||||
'Text': {'Data': body}
|
||||
}
|
||||
|
||||
if html_body:
|
||||
body.update({
|
||||
'Html': {'Data': html_body}
|
||||
})
|
||||
|
||||
start_time = monotonic()
|
||||
response = self._client.send_email(
|
||||
Source=source,
|
||||
@@ -73,9 +83,7 @@ class AwsSesClient(EmailClient):
|
||||
'Subject': {
|
||||
'Data': subject,
|
||||
},
|
||||
'Body': {
|
||||
'Text': {
|
||||
'Data': body}}
|
||||
'Body': body
|
||||
},
|
||||
ReplyToAddresses=reply_to_addresses)
|
||||
elapsed_time = monotonic() - start_time
|
||||
|
||||
Reference in New Issue
Block a user