From 51881a01df4d5023aabfa2b8acca43b799d2ae3c Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Mon, 21 May 2012 15:41:34 +0200 Subject: rystamps: send Date header in reports --- rystamps.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rystamps.py b/rystamps.py index 16b381e..0655328 100755 --- a/rystamps.py +++ b/rystamps.py @@ -15,6 +15,7 @@ from string import join from smtplib import SMTP from socket import getfqdn from os.path import getmtime +from email.Utils import formatdate from datetime import timedelta, datetime @@ -45,6 +46,7 @@ relay = "mail.example.com" # Sending out alerts def mail(FROM, TO, SUBJECT, BODY): MSG = join(( + "Date: %s" % formatdate(localtime=True), "From: %s" % FROM, "To: %s" % TO, "Subject: %s" % SUBJECT, -- cgit v1.2.3