From 7600e6fc4c190ecf64a71ed591108bb50f5ee98a Mon Sep 17 00:00:00 2001 From: Marius Mauch Date: Mon, 12 Jun 2006 15:57:22 +0000 Subject: add date header for rfc2822 compliance svn path=/main/trunk/; revision=3497 --- pym/portage_mail.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pym') 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): -- cgit v1.2.3-1-g7c22