[CI] Fix ASCII codes. (#1647)
Signed-off-by: Alicia <115451386+congw729@users.noreply.github.com>
This commit is contained in:
1 parent
35bd3ff7d2
commit
29eecc2da8
1 file changed
+2
-1
@@ -13,6 +13,7 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import smtplib
|
import smtplib
|
||||||
import sys
|
import sys
|
||||||
|
from email.header import Header
|
||||||
from email.mime.application import MIMEApplication
|
from email.mime.application import MIMEApplication
|
||||||
from email.mime.multipart import MIMEMultipart
|
from email.mime.multipart import MIMEMultipart
|
||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
@@ -123,7 +124,7 @@ def _send_mail(
|
|||||||
subject = _build_subject(prefix=prefix, date_str=date_str)
|
subject = _build_subject(prefix=prefix, date_str=date_str)
|
||||||
|
|
||||||
msg = MIMEMultipart()
|
msg = MIMEMultipart()
|
||||||
msg["Subject"] = subject
|
msg["Subject"] = Header(subject, "utf-8")
|
||||||
msg["From"] = sender
|
msg["From"] = sender
|
||||||
msg["To"] = ", ".join(recipients)
|
msg["To"] = ", ".join(recipients)
|
||||||
msg.attach(MIMEText(body, "plain", "utf-8"))
|
msg.attach(MIMEText(body, "plain", "utf-8"))
|
||||||
|
|||||||
Reference in new issue
Block a user