mirror of
https://github.com/python/cpython.git
synced 2025-11-29 22:41:59 +00:00
Added documentation for new optional credentials argument to SMTPHandler.__init__().
This commit is contained in:
parent
70c8e8b861
commit
c0a293c692
1 changed files with 5 additions and 2 deletions
|
|
@ -1296,13 +1296,16 @@ The \class{SMTPHandler} class, located in the
|
||||||
\module{logging.handlers} module, supports sending logging messages to
|
\module{logging.handlers} module, supports sending logging messages to
|
||||||
an email address via SMTP.
|
an email address via SMTP.
|
||||||
|
|
||||||
\begin{classdesc}{SMTPHandler}{mailhost, fromaddr, toaddrs, subject}
|
\begin{classdesc}{SMTPHandler}{mailhost, fromaddr, toaddrs, subject\optional{,
|
||||||
|
credentials}}
|
||||||
Returns a new instance of the \class{SMTPHandler} class. The
|
Returns a new instance of the \class{SMTPHandler} class. The
|
||||||
instance is initialized with the from and to addresses and subject
|
instance is initialized with the from and to addresses and subject
|
||||||
line of the email. The \var{toaddrs} should be a list of strings. To specify a
|
line of the email. The \var{toaddrs} should be a list of strings. To specify a
|
||||||
non-standard SMTP port, use the (host, port) tuple format for the
|
non-standard SMTP port, use the (host, port) tuple format for the
|
||||||
\var{mailhost} argument. If you use a string, the standard SMTP port
|
\var{mailhost} argument. If you use a string, the standard SMTP port
|
||||||
is used.
|
is used. If your SMTP server requires authentication, you can specify a
|
||||||
|
(username, password) tuple for the \var{credentials} argument.
|
||||||
|
\versionchanged[\var{credentials} was added]{2.6}
|
||||||
\end{classdesc}
|
\end{classdesc}
|
||||||
|
|
||||||
\begin{methoddesc}{emit}{record}
|
\begin{methoddesc}{emit}{record}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue