Patch: add Date to email header
Posted: February 16th, 2009, 4:16 am
Some spam filters filter out emails missing the Date field.
Code: Select all
--- SABnzbd-0.4.6/sabnzbd/email.py 2008-12-12 09:05:20.000000000 +1100
+++ /usr/share/sabnzbd/sabnzbd/email.py 2009-02-16 20:01:03.000000000 +1100
@@ -117,8 +117,8 @@
return failure
# Message header
- msg = "From: %s\r\nTo: %s\r\nSubject: %s\r\nX-Priority: 5\r\nX-MS-Priority: 5\r\n\r\n" % \
- (sabnzbd.EMAIL_FROM, sabnzbd.EMAIL_TO, header)
+ msg = "From: %s\r\nTo: %s\r\nDate: %s\r\nSubject: %s\r\nX-Priority: 5\r\nX-MS-Priority: 5\r\n\r\n" % \
+ (sabnzbd.EMAIL_FROM, sabnzbd.EMAIL_TO, time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()), header)
# Authentication
if (sabnzbd.EMAIL_ACCOUNT != "") and (sabnzbd.EMAIL_PWD != ""):