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

Commit 6946209

Browse files
authored
Set email charset as utf-8 rather than utf8 (#16329)
1 parent fedaebc commit 6946209

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

changelog.d/16329.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use standard name for UTF-8 charset in emails.

synapse/handlers/send_email.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ async def send_email(
174174
if raw_to == "":
175175
raise RuntimeError("Invalid 'to' address")
176176

177-
html_part = MIMEText(html, "html", "utf8")
178-
text_part = MIMEText(text, "plain", "utf8")
177+
html_part = MIMEText(html, "html", "utf-8")
178+
text_part = MIMEText(text, "plain", "utf-8")
179179

180180
multipart_msg = MIMEMultipart("alternative")
181181
multipart_msg["Subject"] = subject

0 commit comments

Comments
 (0)