0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 10:23:57 +01:00

Set email charset as utf-8 rather than utf8 (#16329)

This commit is contained in:
José Joaquín Atria 2023-09-18 12:32:01 +01:00 committed by GitHub
parent fedaebc440
commit 6946209e67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/16329.bugfix Normal file
View file

@ -0,0 +1 @@
Use standard name for UTF-8 charset in emails.

View file

@ -174,8 +174,8 @@ class SendEmailHandler:
if raw_to == "":
raise RuntimeError("Invalid 'to' address")
html_part = MIMEText(html, "html", "utf8")
text_part = MIMEText(text, "plain", "utf8")
html_part = MIMEText(html, "html", "utf-8")
text_part = MIMEText(text, "plain", "utf-8")
multipart_msg = MIMEMultipart("alternative")
multipart_msg["Subject"] = subject