Commit 9a38c1cd authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

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

[1.1.X] Fixed #11849 -- Corrected handling of use_tls in the SMTP mail 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
parent a9c816c4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -112,7 +112,10 @@ class SMTPConnection(object):
        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.fail_silently = fail_silently
        self.connection = None