diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-11-04 01:59:05 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-11-04 01:59:05 +0000 |
| commit | 77b602a4ab55a655a0a50dbd8fe130f0952848c4 (patch) | |
| tree | 10943c7fef33380c34546ff70ec37e6e9d683ee1 | |
| parent | f9ead3fe4276597e7ed69e4b2658040b21df5c76 (diff) | |
Fixed #11849 -- Corrected handling of use_tls in the SMTP mail handler. Thanks to aromano for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/mail/backends/smtp.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/core/mail/backends/smtp.py b/django/core/mail/backends/smtp.py index 12cb26c059..63efe438d3 100644 --- a/django/core/mail/backends/smtp.py +++ b/django/core/mail/backends/smtp.py @@ -19,7 +19,10 @@ class EmailBackend(BaseEmailBackend): self.port = port or settings.EMAIL_PORT self.username = username or settings.EMAIL_HOST_USER self.password = password or settings.EMAIL_HOST_PASSWORD - self.use_tls = (use_tls is not None) and use_tls or settings.EMAIL_USE_TLS + if use_tls is None: + self.use_tls = settings.EMAIL_USE_TLS + else: + self.use_tls = use_tls self.connection = None self._lock = threading.RLock() |
