Commit 37e8b0c8 authored by Colomban Wendling's avatar Colomban Wendling

Add Date field in sent emails

Some emails client don't know the date if this field is not present,
and although some MTAs add it it can't be relied upon.
parent 5590a3e9
......@@ -2,6 +2,7 @@ import smtplib
from email.mime.text import MIMEText
from collections import defaultdict
from sys import stderr
from time import strftime
import email.charset
from threading import Thread
import queue
......@@ -90,6 +91,7 @@ def send_email_for_check(check):
msg['Subject'] = subject
msg['From'] = config.emails.addr_from
msg['To'] = ", ".join(
msg['Date'] = strftime('%a, %d %b %Y %H:%M:%S %z')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment