Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

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

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/16329.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use standard name for UTF-8 charset in emails.
4 changes: 2 additions & 2 deletions synapse/handlers/send_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ async def send_email(
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
Expand Down
Loading