]> granicus.if.org Git - python/commitdiff
Closes #12667: Corrected documentation for SMTPHandler secure argument.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Mon, 1 Aug 2011 10:28:02 +0000 (11:28 +0100)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Mon, 1 Aug 2011 10:28:02 +0000 (11:28 +0100)
Doc/library/logging.handlers.rst

index 9db262acbfde1c49f91951ccaaf5597043fc38dd..1a1449918053b7d6249a9a56bfa45a93e2f8b1a5 100644 (file)
@@ -613,8 +613,14 @@ supports sending logging messages to an email address via SMTP.
    port, use the (host, port) tuple format for the *mailhost* argument. If you
    use a string, the standard SMTP port is used. If your SMTP server requires
    authentication, you can specify a (username, password) tuple for the
-   *credentials* argument. If *secure* is True, then the handler will attempt
-   to use TLS for the email transmission.
+   *credentials* argument.
+
+   To specify the use of a secure protocol (TLS), pass in a tuple to the
+   *secure* argument. This will only be used when authentication credentials are
+   supplied. The tuple should be either an empty tuple, or a single-value tuple
+   with the name of a keyfile, or a 2-value tuple with the names of the keyfile
+   and certificate file. (This tuple is passed to the
+   :meth:`smtplib.SMTP.starttls` method.)
 
    .. versionchanged:: 2.6
       *credentials* was added.