Add HTML email

Make the SES client optionally pass through HTML and text body, as per:
http://docs.aws.amazon.com/ses/latest/APIReference/API_Body.html

Gets the message as HTML from:
https://github.com/alphagov/notifications-utils/pull/12
This commit is contained in:
Chris Hill-Scott
2016-03-18 11:47:01 +00:00
parent c3ffae3cf7
commit f3ddf1f456
4 changed files with 27 additions and 9 deletions

View File

@@ -267,7 +267,8 @@ def send_email(service_id, notification_id, subject, from_address, encrypted_not
from_address,
notification['to'],
subject,
template.replaced
body=template.replaced,
html_body=template.as_HTML_email,
)
update_notification_reference_by_id(notification_id, reference)
except AwsSesClientException as e: