From: Zac Medico Date: Wed, 21 Jun 2006 03:04:25 +0000 (-0000) Subject: Add date header for rfc2822 compliance. This patch is from trunk r3497. X-Git-Tag: v2.1-r1~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d0ad6ede78e705f56eca92ad5b90760312ef2ef9;p=portage.git Add date header for rfc2822 compliance. This patch is from trunk r3497. svn path=/main/branches/2.1/; revision=3573 --- diff --git a/pym/elog_modules/mod_mail.py b/pym/elog_modules/mod_mail.py index cc67015f7..e9863e6c9 100644 --- a/pym/elog_modules/mod_mail.py +++ b/pym/elog_modules/mod_mail.py @@ -1,4 +1,4 @@ -import smtplib, email.Message, socket, portage_exception +import smtplib, email.Message, socket, time, portage_exception def process(mysettings, cpv, logentries, fulltext): mymailhost = "localhost" @@ -44,6 +44,7 @@ def process(mysettings, cpv, logentries, fulltext): mysubject = mysubject.replace("${HOST}", socket.getfqdn()) mymessage["Subject"] = mysubject + mymessage["Date"] = time.strftime("%a, %d %b %Y %H:%M:%S %z") if int(mymailport) > 100000: myconn = smtplib.SMTP(mymailhost, int(mymailport) - 100000)