diff --git a/rowers/emails.py b/rowers/emails.py index 826d43bb..4be99e9d 100644 --- a/rowers/emails.py +++ b/rowers/emails.py @@ -53,6 +53,9 @@ def textify(html): # Strip single spaces in the beginning of each line return text_only.replace('\n ', '\n').strip() +def newlinetobr(html): + return html.replace('\n','
') + def send_template_email(from_email,to_email,subject, template,context, *args,**kwargs): @@ -61,6 +64,7 @@ def send_template_email(from_email,to_email,subject, html_content = htmly.render(context) text_content = textify(html_content) + html_content = newlinetobr(html_content) if 'cc' in kwargs: msg = EmailMultiAlternatives(subject, text_content, from_email, to_email,cc=kwargs['cc'])