mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Send emails with a friendly from name
It’s nicer to have emails with a sender name, as well as the raw email address. Amazon SES can acheive this by using the format ``` "Sender name" <sender.name@domain.com> ``` — http://docs.aws.amazon.com/ses/latest/DeveloperGuide/email-format.html We also have to remove all non-ASCII characters from the sender name, because SMTP only supports 7-bit ASCII: > A field name MUST be composed of printable US-ASCII characters (i.e., > characters that have values between 33 and 126, inclusive), except > colon. — http://www.ietf.org/rfc/rfc5322.txt We use the service name as the sender name when: - sending emails from the API - sending emails from a CSV file We use GOV.UK Notify as the sender name when: - sending invitation emails - sending password reset emails
This commit is contained in:
@@ -1012,7 +1012,7 @@ def test_should_allow_valid_email_notification(notify_api, sample_email_template
|
||||
app.celery.tasks.send_email.apply_async.assert_called_once_with(
|
||||
(str(sample_email_template.service_id),
|
||||
notification_id,
|
||||
"sample.service@test.notify.com",
|
||||
"\"Sample service\" <sample.service@test.notify.com>",
|
||||
"something_encrypted",
|
||||
"2016-01-01T11:09:00.061258"),
|
||||
queue="email"
|
||||
|
||||
Reference in New Issue
Block a user