summaryrefslogtreecommitdiffstats
path: root/Doc/library/logging.handlers.rst
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-08-01 10:32:49 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-08-01 10:32:49 (GMT)
commitb07df00bce440f6e4f815139df7b15049408c336 (patch)
tree5a1a8b43b2598d3a285e5a86415f1a450d7e90a4 /Doc/library/logging.handlers.rst
parente906c13da45eb320b11eaa59404e24ab44f69ce5 (diff)
parent952595696a43f1d8a6c79da314bad4ed93bc9209 (diff)
downloadcpython-b07df00bce440f6e4f815139df7b15049408c336.zip
cpython-b07df00bce440f6e4f815139df7b15049408c336.tar.gz
cpython-b07df00bce440f6e4f815139df7b15049408c336.tar.bz2
Closes #12667: Merged fix from 3.2.
Diffstat (limited to 'Doc/library/logging.handlers.rst')
-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 82e3969..27d2efd 100644
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -623,7 +623,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
@@ -632,6 +632,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)