summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2012-05-21 13:41:34 (GMT)
committerAdrian C. (anrxc) <anrxc@sysphere.org>2012-05-21 13:42:09 (GMT)
commit51881a01df4d5023aabfa2b8acca43b799d2ae3c (patch)
treecd429521140b0a6699819031707dc9a155a54f73
parent3de1a8cb0582fcae4fdc1f38a92820284cd0111e (diff)
downloadrybackup-public.tar.xz
rystamps: send Date header in reportsHEADpublic
-rwxr-xr-xrystamps.py2
1 files changed, 2 insertions, 0 deletions
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,