Fixed #3472 -- Don't BASE64-encode UTF-8 (or ASCII) email messages.
Patch from smurf@smurf.noris.de. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5143 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
befbd82d85
commit
21a2ca6a21
|
@ -6,12 +6,17 @@ from django.conf import settings
|
||||||
from email.MIMEText import MIMEText
|
from email.MIMEText import MIMEText
|
||||||
from email.Header import Header
|
from email.Header import Header
|
||||||
from email.Utils import formatdate
|
from email.Utils import formatdate
|
||||||
|
from email import Charset
|
||||||
import os
|
import os
|
||||||
import smtplib
|
import smtplib
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
import random
|
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
|
# Cache the hostname, but do it lazily: socket.getfqdn() can take a couple of
|
||||||
# seconds, which slows down the restart of the server.
|
# seconds, which slows down the restart of the server.
|
||||||
class CachedDnsName(object):
|
class CachedDnsName(object):
|
||||||
|
|
Loading…
Reference in New Issue