Commit 190820a8 authored by Julien Muchembled's avatar Julien Muchembled

NotificationTool: do not add empty Subject:; To: or From: fields

We might want to rely on MailHost for filling those fields.
parent fa908d78
......@@ -134,9 +134,12 @@ def buildEmailMessage(from_url, to_url, msg=None,
for key, value in additional_headers.items():
message.add_header(key, value)
if subject:
message.add_header('Subject',
make_header([(subject, 'utf-8')]).encode())
if from_url:
message.add_header('From', from_url)
if to_url:
message.add_header('To', to_url)
for attachment in attachment_list:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment