fix for error:BadHeaderError: Header values can't contain newlines when running get_email. caused by subject_part being repeated, but second time doesnt strip newlines

This commit is contained in:
User 2017-01-08 18:52:24 +01:00
parent c3d83462a3
commit b7baf2bf56

View File

@ -103,11 +103,6 @@ def send_templated_mail(template_name,
(email_html_base_file, t.heading, t.html) (email_html_base_file, t.heading, t.html)
).render(context) ).render(context)
subject_part = from_string(
HELPDESK_EMAIL_SUBJECT_TEMPLATE % {
"subject": t.subject,
}).render(context)
if isinstance(recipients, str): if isinstance(recipients, str):
if recipients.find(','): if recipients.find(','):
recipients = recipients.split(',') recipients = recipients.split(',')