Author: adrian
Date: 2006-05-25 23:40:48 -0500 (Thu, 25 May 2006)
New Revision: 2984
Modified:
django/trunk/django/core/mail.py
Log:
Fixed #1634 -- Changed django.core.mail to include 'Date' header in e-mails.
Thanks, Eric Walstad
Modified: django/trunk/django/core/mail.py
===================================================================
--- django/trunk/django/core/mail.py 2006-05-26 04:21:36 UTC (rev 2983)
+++ django/trunk/django/core/mail.py 2006-05-26 04:40:48 UTC (rev 2984)
@@ -3,7 +3,7 @@
from django.conf import settings
from email.MIMEText import MIMEText
from email.Header import Header
-import smtplib
+import smtplib, rfc822
class BadHeaderError(ValueError):
pass
@@ -49,6 +49,7 @@
msg['Subject'] = subject
msg['From'] = from_email
msg['To'] = ', '.join(recipient_list)
+ msg['Date'] = rfc822.formatdate()
try:
server.sendmail(from_email, recipient_list, msg.as_string())
num_sent += 1
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---