Skip to content

Commit

Permalink
T6542 - Betere opmaak emails voor Brevo
Browse files Browse the repository at this point in the history
  • Loading branch information
TinusVL committed Jun 6, 2024
1 parent f5d9643 commit 9b31a3b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/apps/visums/services/inuits_visum_mail_service.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import datetime
import re
from typing import List

from django.conf import settings
Expand Down Expand Up @@ -300,6 +301,10 @@ def _send_prepared_email(
html_body = self._prepare_email_body(template_path=template_path, dictionary=dictionary)
html_body_end = self._prepare_email_body(template_path=self.template_path_end, dictionary=dictionary)
html_body = TextUtils.compose_html_email_prepared_end(self.template_path_start, html_body, html_body_end)
# Voorkom dat Brevo automatisch achter elke lijn een '<br>' plakt.
html_body = ' '.join(html_body.splitlines())
# Combineer opeenvolgende spaties
html_body = re.sub(' +', ' ', html_body)

if not reply_to:
reply_to = self.from_email
Expand Down

0 comments on commit 9b31a3b

Please sign in to comment.