changeset 87bd1a818284 in trytond:5.2 details: https://hg.tryton.org/trytond?cmd=changeset;node=87bd1a818284 description: Add missing Date header on email sent
issue8596 review272091002 (grafted from fc47f7e21925305bbb2d6783e74949ee83186469) diffstat: trytond/sendmail.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diffs (20 lines): diff -r 7e7fe6e2b598 -r 87bd1a818284 trytond/sendmail.py --- a/trytond/sendmail.py Fri Aug 23 18:31:05 2019 +0200 +++ b/trytond/sendmail.py Fri Aug 30 09:08:32 2019 +0200 @@ -3,6 +3,7 @@ import logging import smtplib from email.message import Message +from email.utils import formatdate from urllib.parse import parse_qs, unquote_plus from .config import config, parse_uri @@ -31,6 +32,8 @@ quit = True else: quit = False + if 'Date' not in msg: + msg['Date'] = formatdate() try: senderrs = server.sendmail(from_addr, to_addrs, msg.as_string()) except smtplib.SMTPException: