修改文件CTFd/CTFd/utils/email/smtp.py
添加代码

from email.header import Header
from email.mime.text import MIMEText

修改smtp = get_smtp(**data)后面的代码

#        msg = EmailMessage()
#        msg.set_content(text)
#
#        msg["Subject"] = subject
#        msg["From"] = mailfrom_addr
#        msg["To"] = addr
#
#        smtp.send_message(msg)

        msg = MIMEText(text, 'html', 'utf-8')
        msg['Subject'] = Header(subject, 'utf-8')
        msg['From'] = mailfrom_addr
        msg['To'] = addr

        smtp.sendmail(mailfrom_addr, addr, msg.as_string())
最后修改:2020 年 08 月 15 日 03 : 27 PM