Skip to content

Commit 7337b6d

Browse files
committed
Clarify host and port parameter behavior in smtplib.SMTP_SSL initialization
1 parent 65451a6 commit 7337b6d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Doc/library/smtplib.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
2424
.. class:: SMTP(host='', port=0, local_hostname=None[, timeout], source_address=None)
2525

2626
An :class:`SMTP` instance encapsulates an SMTP connection. It has methods
27-
that support a full repertoire of SMTP and ESMTP operations. If the optional
28-
*host* and *port* parameters are given, the SMTP :meth:`connect` method is
29-
called with those parameters during initialization.If *host* is omitted or
30-
an empty string, no connection is made during initialization; you must
27+
that support a full repertoire of SMTP and ESMTP operations.
28+
If *host* is omitted or set to an empty string, no connection is made during initialization; you must
3129
call :meth:`connect` manually before using the instance.
32-
If *port* is zero, the default SMTP port (25) is used. If specified,
30+
If *port* is zero,the value of the :attr:`default_port` attribute is used. If specified,
3331
*local_hostname* is used as the FQDN of the local host in the HELO/EHLO
3432
command. Otherwise, the local hostname is found using
3533
:func:`socket.getfqdn`. If the :meth:`connect` call returns anything other

0 commit comments

Comments
 (0)