Include proper Date header in email notifications.
This commit is contained in:
parent
bb0746c3e8
commit
42e1e2fd20
|
@ -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())
|
||||
|
||||
|
|
Loading…
Reference in New Issue