Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #3554: django.core.mail now generates dates with the email modu…

…le instead of the outdated rfc822 module. Thanks, real.human@mrmachine.net

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4570 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8546521d9bf76e831c9379c4204fb7497101a7a7 1 parent f2aa1b9
Jacob Kaplan-Moss authored February 25, 2007

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  django/core/mail.py
5  django/core/mail.py
@@ -3,7 +3,8 @@
3 3
 from django.conf import settings
4 4
 from email.MIMEText import MIMEText
5 5
 from email.Header import Header
6  
-import smtplib, rfc822
  6
+from email.Utils import formatdate
  7
+import smtplib
7 8
 import socket
8 9
 import time
9 10
 import random
@@ -65,7 +66,7 @@ def send_mass_mail(datatuple, fail_silently=False, auth_user=settings.EMAIL_HOST
65 66
         msg['Subject'] = subject
66 67
         msg['From'] = from_email
67 68
         msg['To'] = ', '.join(recipient_list)
68  
-        msg['Date'] = rfc822.formatdate()
  69
+        msg['Date'] = formatdate()
69 70
         try:
70 71
             random_bits = str(random.getrandbits(64))
71 72
         except AttributeError: # Python 2.3 doesn't have random.getrandbits().

0 notes on commit 8546521

Please sign in to comment.
Something went wrong with that request. Please try again.