summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-08-01 10:31:52 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-08-01 10:31:52 (GMT)
commit952595696a43f1d8a6c79da314bad4ed93bc9209 (patch)
tree6c9122ffb48048a896fab5a0cf1d45ee28a2e180
parent222e61e44454611f2b037a2a596eb60c5b7fb695 (diff)
downloadcpython-952595696a43f1d8a6c79da314bad4ed93bc9209.zip
cpython-952595696a43f1d8a6c79da314bad4ed93bc9209.tar.gz
cpython-952595696a43f1d8a6c79da314bad4ed93bc9209.tar.bz2
Closes #12667: Added documentation for SMTPHandler secure argument.
-rw-r--r--Doc/library/logging.handlers.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst
index 378c071..a18cf92 100644
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -614,7 +614,7 @@ The :class:`SMTPHandler` class, located in the :mod:`logging.handlers` module,
supports sending logging messages to an email address via SMTP.
-.. class:: SMTPHandler(mailhost, fromaddr, toaddrs, subject, credentials=None)
+.. class:: SMTPHandler(mailhost, fromaddr, toaddrs, subject, credentials=None, secure=None)
Returns a new instance of the :class:`SMTPHandler` class. The instance is
initialized with the from and to addresses and subject line of the email. The
@@ -623,6 +623,12 @@ supports sending logging messages to an email address via SMTP.
the standard SMTP port is used. If your SMTP server requires authentication, you
can specify a (username, password) tuple for the *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.)
.. method:: emit(record)