summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-09-11 16:58:00 (GMT)
committerFred Drake <fdrake@acm.org>2001-09-11 16:58:00 (GMT)
commitaae8da18fd43ea8048d3ea161d85e40677d18269 (patch)
tree72b0b3e02052aa8f5369ea784fb13d65ae76d488 /Doc
parent42706803cd6f09ea21a224245fadaf451487589a (diff)
downloadcpython-aae8da18fd43ea8048d3ea161d85e40677d18269.zip
cpython-aae8da18fd43ea8048d3ea161d85e40677d18269.tar.gz
cpython-aae8da18fd43ea8048d3ea161d85e40677d18269.tar.bz2
Documentation for the new login() method of the smtplib.SMTP class,
contributed by Gerhard Häring. This is part of SF patch #460112.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libsmtplib.tex18
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/lib/libsmtplib.tex b/Doc/lib/libsmtplib.tex
index 4a7b2df..c5db75f 100644
--- a/Doc/lib/libsmtplib.tex
+++ b/Doc/lib/libsmtplib.tex
@@ -160,6 +160,24 @@ an SMTP error code of 400 or greater and an error string.
Note: many sites disable SMTP \samp{VRFY} in order to foil spammers.
\end{methoddesc}
+\begin{methoddesc}{login}{user, password}
+Log in on an SMTP server that requires authentication.
+The arguments are the username and the password to authenticate with.
+If there has been no previous \samp{EHLO} or \samp{HELO} command this
+session, this method tries ESMTP \samp{EHLO} first.
+This method will return normally if the authentication was successful,
+or may raise the following exceptions:
+
+\begin{description}
+ \item[\exception{SMTPHeloError}]
+ The server didn't reply properly to the \samp{HELO} greeting.
+ \item[\exception{SMTPAuthenticationError}]
+ The server didn't accept the username/password combination.
+ \item[\exception{SMTPError}]
+ No suitable authentication method was found.
+\end{description}
+\end{methoddesc}
+
\begin{methoddesc}{sendmail}{from_addr, to_addrs, msg\optional{,
mail_options, rcpt_options}}
Send mail. The required arguments are an \rfc{822} from-address