Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.1.X] Fixed #11849 -- Corrected handling of use_tls in the SMTP mai…

…l handler. Thanks to aromano for the report.

Backport of r11714 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@11715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9a38c1cdb2b04ab62d46ee3fcc709680ca5d74ed 1 parent a9c816c
Russell Keith-Magee authored

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  django/core/mail.py
5  django/core/mail.py
@@ -112,7 +112,10 @@ def __init__(self, host=None, port=None, username=None, password=None,
112 112
         self.port = port or settings.EMAIL_PORT
113 113
         self.username = username or settings.EMAIL_HOST_USER
114 114
         self.password = password or settings.EMAIL_HOST_PASSWORD
115  
-        self.use_tls = (use_tls is not None) and use_tls or settings.EMAIL_USE_TLS
  115
+        if use_tls is None:
  116
+            self.use_tls = settings.EMAIL_USE_TLS
  117
+        else:
  118
+            self.use_tls = use_tls
116 119
         self.fail_silently = fail_silently
117 120
         self.connection = None
118 121
 

0 notes on commit 9a38c1c

Please sign in to comment.
Something went wrong with that request. Please try again.