summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2006-06-12 15:57:22 +0000
committerMarius Mauch <genone@gentoo.org>2006-06-12 15:57:22 +0000
commit7600e6fc4c190ecf64a71ed591108bb50f5ee98a (patch)
treee79810e4dac88c7cc459a4a2555897110d84f662
parent474e2e3965bd41fe96958b844b38fec71466fa49 (diff)
downloadportage-7600e6fc4c190ecf64a71ed591108bb50f5ee98a.tar.gz
portage-7600e6fc4c190ecf64a71ed591108bb50f5ee98a.tar.bz2
portage-7600e6fc4c190ecf64a71ed591108bb50f5ee98a.zip
add date header for rfc2822 compliance
svn path=/main/trunk/; revision=3497
-rw-r--r--pym/portage_mail.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage_mail.py b/pym/portage_mail.py
index 54043e674..4e56ca74c 100644
--- a/pym/portage_mail.py
+++ b/pym/portage_mail.py
@@ -3,7 +3,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id: portage.py 3483 2006-06-10 21:40:40Z genone $
-import portage_exception, socket, smtplib, os
+import portage_exception, socket, smtplib, os, time
from email.MIMEText import MIMEText as TextMessage
from email.MIMEMultipart import MIMEMultipart as MultipartMessage
from email.MIMEBase import MIMEBase as BaseMessage
@@ -26,7 +26,8 @@ def create_message(sender, recipient, subject, body, attachments=None):
mymessage["To"] = recipient
mymessage["From"] = sender
mymessage["Subject"] = subject
-
+ mymessage["Date"] = time.strftime("%a, %d %b %Y %H:%M:%S %z")
+
return mymessage
def send_mail(mysettings, message):