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

Commit

Permalink
Set email charset as utf-8 rather than utf8 (#16329)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjatria authored Sep 18, 2023
1 parent fedaebc commit 6946209
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit 6946209

Please sign in to comment.