Add newline in text part before the footer when sending mail

This commit is contained in:
bbe 2020-10-30 19:57:23 +01:00
parent 5fce1964de
commit e8f6756750

View File

@ -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', '<br>'))
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)