aboutsummaryrefslogtreecommitdiffstats
path: root/news2mail.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2023-03-01 11:35:54 +0100
committerMatěj Cepl <mcepl@cepl.eu>2023-05-25 10:56:30 +0200
commit458dd9bdb4a0346b09112659af66b560cefa1d98 (patch)
tree7d221497dba5bb649390a4db06aa217f6cf8fa37 /news2mail.py
parentd79cdd057a1e7dc44a5196905e897ee0f100f9d1 (diff)
downloadpygn-458dd9bdb4a0346b09112659af66b560cefa1d98.tar.gz
Use email.policy.SMTP to be perfectly conforming with RFCs.
Perhaps fixes: https://todo.sr.ht/~mcepl/pygn/6
Diffstat (limited to 'news2mail.py')
-rw-r--r--news2mail.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/news2mail.py b/news2mail.py
index a92c7e5..33d2590 100644
--- a/news2mail.py
+++ b/news2mail.py
@@ -54,7 +54,7 @@ class news2mail(object):
self.heads_dict = {}
self.article, self.headers, self.body = [], [], []
self.message = self.__addheads(
- email.message_from_file(sys.stdin, policy=email.policy.default))
+ email.message_from_file(sys.stdin, policy=email.policy.SMTP))
def __addheads(self, msg):
"""add new header like X-Gateway: Received: