Adjust gpg-mailgate.py script to use SMTPUTF8 policy

This commit is contained in:
Piotr F. Mieszkowski 2023-03-07 20:39:32 +01:00
parent 54ee9d9875
commit 86a3e0031b
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@
#
import email
from email.policy import SMTPUTF8
import sys
import time
import logging
@ -42,7 +43,7 @@ if missing_params:
# Read e-mail from stdin, parse it
raw = sys.stdin.read()
raw_message = email.message_from_string(raw)
raw_message = email.message_from_string(raw, policy=SMTPUTF8)
from_addr = raw_message['From']
# Read recipients from the command-line
to_addrs = sys.argv[1:]