Skip to content

Commit 54907a0

Browse files
committed
Clarify smtplib docs: host/port explanation
1 parent 7337b6d commit 54907a0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Doc/library/smtplib.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
2727
that support a full repertoire of SMTP and ESMTP operations.
2828
If *host* is omitted or set to an empty string, no connection is made during initialization; you must
2929
call :meth:`connect` manually before using the instance.
30-
If *port* is zero,the value of the :attr:`default_port` attribute is used. If specified,
31-
*local_hostname* is used as the FQDN of the local host in the HELO/EHLO
30+
If *port* is zero,the value of the :attr:`default_port` attribute is used.
31+
32+
If specified, *local_hostname* is used as the FQDN of the local host in the HELO/EHLO
3233
command. Otherwise, the local hostname is found using
3334
:func:`socket.getfqdn`. If the :meth:`connect` call returns anything other
3435
than a success code, an :exc:`SMTPConnectError` is raised. The optional
@@ -86,8 +87,9 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
8687
SMTP_SSL :meth:`connect` method is called with those parameters during initialization.
8788
If *host* is omitted or an empty string, no connection is made during initialization;
8889
you must call :meth:`connect` manually before using the instance. If
89-
*port* is zero, the standard SMTP-over-SSL port (465) is used. The optional
90-
arguments *local_hostname*, *timeout* and *source_address* have the same
90+
*port* is zero, the standard SMTP-over-SSL port (465) is used.
91+
92+
The optional arguments *local_hostname*, *timeout* and *source_address* have the same
9193
meaning as they do in the :class:`SMTP` class. *context*, also optional,
9294
can contain a :class:`~ssl.SSLContext` and allows configuring various
9395
aspects of the secure connection. Please read :ref:`ssl-security` for

0 commit comments

Comments
 (0)