Let the send_email task set the from address

This commit is contained in:
Rebecca Law
2016-06-13 14:56:21 +01:00
parent c9f1eb65a7
commit 5fc14940f3
4 changed files with 6 additions and 27 deletions

View File

@@ -180,16 +180,10 @@ def process_job(job_id):
)
if template.template_type == 'email':
from_email = '"{}" <{}@{}>'.format(
service.name,
service.email_from,
current_app.config['NOTIFY_EMAIL_DOMAIN']
)
send_email.apply_async((
str(job.service_id),
create_uuid(),
from_email.encode('ascii', 'ignore').decode('ascii'),
'',
encrypted,
datetime.utcnow().strftime(DATETIME_FORMAT)),
{'reply_to_addresses': service.reply_to_email_address},