From e8f6756750eadbe7738eb2f152c01f4b7814c9d9 Mon Sep 17 00:00:00 2001 From: bbe Date: Fri, 30 Oct 2020 19:57:23 +0100 Subject: [PATCH] Add newline in text part before the footer when sending mail --- helpdesk/templated_email.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helpdesk/templated_email.py b/helpdesk/templated_email.py index e26df247..08cb7628 100644 --- a/helpdesk/templated_email.py +++ b/helpdesk/templated_email.py @@ -73,7 +73,7 @@ def send_templated_mail(template_name, footer_file = os.path.join('helpdesk', locale, 'email_text_footer.txt') text_part = from_string( - "%s{%% include '%s' %%}" % (t.plain_text, footer_file) + "%s\n\n{%% include '%s' %%}" % (t.plain_text, footer_file) ).render(context) email_html_base_file = os.path.join('helpdesk', locale, 'email_html_base.html') @@ -82,9 +82,9 @@ def send_templated_mail(template_name, context['comment'] = mark_safe(context['comment'].replace('\r\n', '
')) html_part = from_string( - "{%% extends '%s' %%}{%% block title %%}" - "%s" - "{%% endblock %%}{%% block content %%}%s{%% endblock %%}" % + "{%% extends '%s' %%}" + "{%% block title %%}%s{%% endblock %%}" + "{%% block content %%}%s{%% endblock %%}" % (email_html_base_file, t.heading, t.html) ).render(context)