mirror of https://github.com/django/django.git
Fixed bug in [4058], in django/core/mail.py. Thanks, Igor Goryachev
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
5d8c6cf651
commit
83c40fb922
|
@ -59,7 +59,7 @@ def send_mass_mail(datatuple, fail_silently=False, auth_user=settings.EMAIL_HOST
|
||||||
random_bits = str(random.getrandbits(64))
|
random_bits = str(random.getrandbits(64))
|
||||||
except AttributeError: # Python 2.3 doesn't have random.getrandbits().
|
except AttributeError: # Python 2.3 doesn't have random.getrandbits().
|
||||||
random_bits = ''.join([random.choice('1234567890') for i in range(19)])
|
random_bits = ''.join([random.choice('1234567890') for i in range(19)])
|
||||||
msg['Message-ID'] = "<%d.%d@%s>" % (time.time(), random_bits, DNS_NAME)
|
msg['Message-ID'] = "<%d.%s@%s>" % (time.time(), random_bits, DNS_NAME)
|
||||||
try:
|
try:
|
||||||
server.sendmail(from_email, recipient_list, msg.as_string())
|
server.sendmail(from_email, recipient_list, msg.as_string())
|
||||||
num_sent += 1
|
num_sent += 1
|
||||||
|
|
Loading…
Reference in New Issue