Module: deluge Branch: master Commit: 42e1e2fd20f014d9c5d7b756210718d35182d623
Author: Pedro Algarvio <[email protected]> Date: Wed Apr 13 12:54:59 2011 +0100 Include proper Date header in email notifications. --- deluge/plugins/notifications/notifications/core.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/deluge/plugins/notifications/notifications/core.py b/deluge/plugins/notifications/notifications/core.py index 2139de2..92c6146 100644 --- a/deluge/plugins/notifications/notifications/core.py +++ b/deluge/plugins/notifications/notifications/core.py @@ -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()) -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
