From d0ad6ede78e705f56eca92ad5b90760312ef2ef9 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 21 Jun 2006 03:04:25 +0000 Subject: Add date header for rfc2822 compliance. This patch is from trunk r3497. svn path=/main/branches/2.1/; revision=3573 --- pym/elog_modules/mod_mail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3-1-g7c22