Include proper Date header in email notifications.

This commit is contained in:
Pedro Algarvio 2011-04-13 12:54:59 +01:00
parent bb0746c3e8
commit 42e1e2fd20
1 changed files with 4 additions and 1 deletions

View File

@ -38,6 +38,7 @@
#
import smtplib
from datetime import datetime
from twisted.internet import defer, threads
from deluge import component
from deluge.event import known_events
@ -118,11 +119,13 @@ class CoreNotifications(CustomNotifications):
From: %(smtp_from)s
To: %(smtp_recipients)s
Subject: %(subject)s
Date: %(date)s
""" % {'smtp_from': self.config['smtp_from'],
'subject': subject,
'smtp_recipients': to_addrs}
'smtp_recipients': to_addrs,
'date': datetime.utcnow().strftime('%a, %d %b %Y %H:%M:%S +0000').strip()}
message = '\r\n'.join((headers + message).splitlines())