Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 jacobian authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 django/core/mail.py
5 django/core/mail.py
View
@@ -3,7 +3,8 @@
from django.conf import settings
from email.MIMEText import MIMEText
from email.Header import Header
-import smtplib, rfc822
+from email.Utils import formatdate
+import smtplib
import socket
import time
import random
@@ -65,7 +66,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()
+ msg['Date'] = formatdate()
try:
random_bits = str(random.getrandbits(64))
except AttributeError: # Python 2.3 doesn't have random.getrandbits().
Please sign in to comment.
Something went wrong with that request. Please try again.