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

pull/16347/head
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