liqd / a4-meinberlin

The central participation platform of the city of Berlin, Germany
https://mein.berlin.de
GNU Affero General Public License v3.0
40 stars 6 forks source link

HTML in plain text emails #5417

Closed xi closed 1 month ago

xi commented 9 months ago

I just received an email to confirm my mail address. It contained HTML in the plain text part:

<p>
bitte bestätigen Sie Ihre E-Mail-Adresse um Ihr Konto auf mein.berlin.de freizuschalten.
</p>
<p>
Nach der Bestätigung können Sie Ideen und Kommentare anlegen und bewerten und an Umfragen teilnehmen.
</p>
<p>
Bei Fragen können Sie sich an support@mein.berlin.de wenden.
</p>

I tried to dig into the code to see why this happens. It seems like most email templates overwrite {% block content %} which is used in both email_base.html and email_base.txt. The proper solution is probably to only use plain text inside {% block content %}, and additionally also overwrite {% block content_html %} if HTML is desired.

goapunk commented 9 months ago

hi @xi, thanks for the issue and the research. We'll discuss it and hopefully come up with a fix soon.

cc @CarolingerSeilchenspringer