Author: mtredinnick
Date: 2007-05-03 07:08:31 -0500 (Thu, 03 May 2007)
New Revision: 5143

Modified:
   django/trunk/django/core/mail.py
Log:
Fixed #3472 -- Don't BASE64-encode UTF-8 (or ASCII) email messages.
Patch from [EMAIL PROTECTED]


Modified: django/trunk/django/core/mail.py
===================================================================
--- django/trunk/django/core/mail.py    2007-05-03 11:50:43 UTC (rev 5142)
+++ django/trunk/django/core/mail.py    2007-05-03 12:08:31 UTC (rev 5143)
@@ -6,12 +6,17 @@
 from email.MIMEText import MIMEText
 from email.Header import Header
 from email.Utils import formatdate
+from email import Charset
 import os
 import smtplib
 import socket
 import time
 import random
 
+# Don't BASE64-encode UTF-8 messages so that we avoid unwanted attention from
+# some spam filters.
+Charset.add_charset('utf-8', Charset.SHORTEST, Charset.QP, 'utf-8')
+
 # Cache the hostname, but do it lazily: socket.getfqdn() can take a couple of
 # seconds, which slows down the restart of the server.
 class CachedDnsName(object):


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to