From 2613829fd6d1661c68853862017fd2f765f12750 Mon Sep 17 00:00:00 2001 From: Christoph Sieber Date: Thu, 9 Jul 2020 23:09:24 +0200 Subject: [PATCH] add date header to emails --- files/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/main.py b/files/main.py index d8b692a..3f252eb 100755 --- a/files/main.py +++ b/files/main.py @@ -34,8 +34,9 @@ # # -import sys, requests, datetime,smtplib +import sys, requests, datetime, smtplib from email.mime.text import MIMEText +from email.utils import formatdate # Redmine config redmine_url = 'https://tickets.zom.bi' @@ -107,6 +108,7 @@ def smtp_send() mediawiki_page['content'] + mail_footer) mail_message['Subject'] = mail_subject mail_message['From'] = smtp_from + mail_message['Date'] = formatdate() for recipient in smtp_recipients: mail_message['To'] = recipient smtp_server.sendmail(from_addr=smtp_from,\