@@ -25,9 +25,10 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
2525
2626 An :class: `SMTP ` instance encapsulates an SMTP connection. It has methods
2727 that support a full repertoire of SMTP and ESMTP operations.
28- If the host parameter is set to a truthy value, :meth: `SMTP.connect ` is
29- called automatically when the object is created, otherwise :meth: `connect ` must be
30- called manually.
28+
29+ If the host parameter is set to a truthy value, :meth: `SMTP.connect ` is called with
30+ host and port automatically when the object is created; otherwise, :meth: `connect ` must
31+ be called manually.
3132
3233 If specified, *local_hostname * is used as the FQDN of the local host in the HELO/EHLO
3334 command. Otherwise, the local hostname is found using
@@ -87,9 +88,11 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
8788 An :class: `SMTP_SSL ` instance behaves exactly the same as instances of
8889 :class: `SMTP `. :class: `SMTP_SSL ` should be used for situations where SSL is
8990 required from the beginning of the connection and using :meth: `SMTP.starttls ` is
90- not appropriate. If the host parameter is set to a truthy value,
91- :meth: `SMTP.connect ` is called automatically when the object is created,
92- otherwise :meth: `!SMTP.connect ` must be called manually.
91+ not appropriate.
92+
93+ If the host parameter is set to a truthy value, :meth: `SMTP.connect ` is called with host
94+ and port automatically when the object is created; otherwise, :meth: `connect ` must
95+ be called manually.
9396
9497 The optional arguments *local_hostname *, *timeout * and *source_address * have the same
9598 meaning as they do in the :class: `SMTP ` class. *context *, also optional,
@@ -271,7 +274,8 @@ An :class:`SMTP` instance has the following methods:
271274 2-tuple of the response code and message sent by the server in its
272275 connection response.
273276
274- If the port is not specified, the value of the :attr: `default_port ` attribute is used.
277+ If port is not changed from its default value of 0, the value of the :attr: `default_port `
278+ attribute is used.
275279
276280 .. audit-event :: smtplib.connect self,host,port smtplib.SMTP.connect
277281
0 commit comments