mirror of
https://github.com/simple-login/app.git
synced 2025-02-23 23:34:05 +08:00
tentative to fix UnicodeEncodeError https://sentry.io/organizations/son/issues/1339911828/?project=1478143&query=is%3Aunresolved
This commit is contained in:
parent
a70436c249
commit
49d66c4226
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ It should contain the following info:
|
|||
"""
|
||||
import time
|
||||
from email.parser import Parser
|
||||
from email.policy import default
|
||||
from email.policy import SMTPUTF8
|
||||
from smtplib import SMTP
|
||||
|
||||
from aiosmtpd.controller import Controller
|
||||
|
@ -82,7 +82,7 @@ class MailHandler:
|
|||
|
||||
# host IP, setup via Docker network
|
||||
smtp = SMTP("1.1.1.1", 25)
|
||||
msg = Parser(policy=default).parsestr(message_data)
|
||||
msg = Parser(policy=SMTPUTF8).parsestr(message_data)
|
||||
|
||||
if not envelope.rcpt_tos[0].startswith("reply+"): # Forward case
|
||||
LOG.debug("Forward phase, add Reply-To header")
|
||||
|
|
Loading…
Reference in a new issue