From 859935e5ee48f18f80ea15666738ae9d0d46ba17 Mon Sep 17 00:00:00 2001 From: Jenny Qian Date: Wed, 29 Oct 2014 10:57:31 -0500 Subject: [PATCH] exclude '\r' from subject_part This is to prevent BadHeaderError("Header values can't contain newlines.. --- helpdesk/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpdesk/lib.py b/helpdesk/lib.py index 5d90c8cb..22ef1a44 100644 --- a/helpdesk/lib.py +++ b/helpdesk/lib.py @@ -115,7 +115,7 @@ def send_templated_mail(template_name, email_context, recipients, sender=None, b elif type(recipients) != list: recipients = [recipients,] - msg = EmailMultiAlternatives( subject_part.replace('\n', ''), + msg = EmailMultiAlternatives( subject_part.replace('\n', '').replace('\r', ''), text_part, sender, recipients,