﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1634	[patch] core.mail does not include a Date header in mails	Russell Cloran <russell@…>	Adrian Holovaty	"Hi,

core.mail does not include a ""Date"" header, leading to mails which land up right at the bottom of my mailbox, which is a bit irritating :)

I can't think of any reason why anybody would want to generate an email without a Date header?

{{{
Index: django/core/mail.py
===================================================================
--- django/core/mail.py (revision 2694)
+++ django/core/mail.py (working copy)
@@ -3,6 +3,7 @@
 from django.conf import settings
 from email.MIMEText import MIMEText
 import smtplib
+import time

 class BadHeaderError(ValueError):
     pass
@@ -46,6 +47,7 @@
         msg['Subject'] = subject
         msg['From'] = from_email
         msg['To'] = ', '.join(recipient_list)
+        msg['Date'] = time.strftime('%a, %d %b %Y %H:%M:%S %z')
         try:
             server.sendmail(from_email, recipient_list, msg.as_string())
             num_sent += 1
}}}
"	task	closed	Validators	new-admin	blocker	fixed			Unreviewed	1	0	0	0	0	0
