diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-05-26 04:40:48 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-05-26 04:40:48 +0000 |
| commit | f375b54503a15360e1b1c08a0ad09c5862bd2083 (patch) | |
| tree | 31ba53ca349cab3beca27cd1b8b2208993fee337 | |
| parent | fd16f1468a0c5825bdd631e9a223601d65f429fb (diff) | |
Fixed #1634 -- Changed django.core.mail to include 'Date' header in e-mails. Thanks, Eric Walstad
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2984 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/mail.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/mail.py b/django/core/mail.py index 415cb6e8fc..da4cacbe29 100644 --- a/django/core/mail.py +++ b/django/core/mail.py @@ -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 @@ def send_mass_mail(datatuple, fail_silently=False, auth_user=settings.EMAIL_HOST 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 |
