From a44290f68e2c5312a1099123e7d318795d4f5692 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 7 Jan 2026 21:35:39 +0100 Subject: [PATCH] Send pure plain-text mails as quoted-printable We were already using QP for HTML emails, but due to an oversight it wasn't done for the pure plaintext ones. Fix that as it's a lot easier to debug that way, and it's what most MUAs do so it should lead to lower spam scores. --- pgweb/mailqueue/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgweb/mailqueue/util.py b/pgweb/mailqueue/util.py index a119f874..527eea95 100644 --- a/pgweb/mailqueue/util.py +++ b/pgweb/mailqueue/util.py @@ -53,7 +53,7 @@ def send_simple_mail(sender, receiver, subject, msgtxt, attachments=None, userge mpart.attach(MIMEText(htmlbody, 'html', _charset=_utf8_charset)) else: # Just a plaintext body, so append it directly - mpart = MIMEText(msgtxt, _charset='utf-8') + mpart = MIMEText(msgtxt, _charset=_utf8_charset) if attachments: msg = MIMEMultipart() -- 2.39.5