summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-09-06 21:26:02 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-09-06 21:26:02 (GMT)
commitfe38e44123437c64bb83094f76985351aa96c568 (patch)
treee7c71729ee9b1bd9ce5342ac75071274d9d2b0f1
parentfeb8cade4df1eb0e8eaeb8e2661812fdf5edaa17 (diff)
downloadcpython-fe38e44123437c64bb83094f76985351aa96c568.zip
cpython-fe38e44123437c64bb83094f76985351aa96c568.tar.gz
cpython-fe38e44123437c64bb83094f76985351aa96c568.tar.bz2
#1317: describe the does_esmtp, ehlo_resp, esmtp_features, and helo_resp attributes
-rw-r--r--Doc/library/smtplib.rst10
1 files changed, 9 insertions, 1 deletions
diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst
index ff580da..bdbbe4a 100644
--- a/Doc/library/smtplib.rst
+++ b/Doc/library/smtplib.rst
@@ -178,6 +178,8 @@ An :class:`SMTP` instance has the following methods:
Identify yourself to the SMTP server using ``HELO``. The hostname argument
defaults to the fully qualified domain name of the local host.
+ The message returned by the server is stored as the :attr:`helo_resp` attribute
+ of the object.
In normal operation it should not be necessary to call this method explicitly.
It will be implicitly called by the :meth:`sendmail` when necessary.
@@ -187,7 +189,13 @@ An :class:`SMTP` instance has the following methods:
Identify yourself to an ESMTP server using ``EHLO``. The hostname argument
defaults to the fully qualified domain name of the local host. Examine the
- response for ESMTP option and store them for use by :meth:`has_extn`.
+ response for ESMTP option and store them for use by :meth:`has_extn`.
+ Also sets several informational attributes: the message returned by
+ the server is stored as the :attr:`ehlo_resp` attribute, :attr:`does_esmtp`
+ is set to true or false depending on whether the server supports ESMTP, and
+ :attr:`esmtp_features` will be a dictionary containing the names of the
+ SMTP service extensions this server supports, and their
+ parameters (if any).
Unless you wish to use :meth:`has_extn` before sending mail, it should not be
necessary to call this method explicitly. It will be implicitly called by