@@ -25,7 +25,10 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
2525 A :class: `SMTP ` instance encapsulates an SMTP connection. It has methods
2626 that support a full repertoire of SMTP and ESMTP operations. If the optional
2727 host and port parameters are given, the SMTP :meth: `connect ` method is called
28- with those parameters during initialization. If the :meth: `connect ` call
28+ with those parameters during initialization. If specified, *local_hostname * is
29+ used as the FQDN of the local host in the HELO/EHLO command. Otherwise, the
30+ local hostname is found using :func: `socket.getfqdn `. If the
31+ :meth: `connect ` call
2932 returns anything other than a success code, an :exc: `SMTPConnectError ` is
3033 raised. The optional *timeout * parameter specifies a timeout in seconds for
3134 blocking operations like the connection attempt (if not specified, the
@@ -57,13 +60,17 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
5760 .. versionchanged :: 3.3
5861 source_address argument was added.
5962
60- .. class :: SMTP_SSL(host='', port=0, local_hostname=None, keyfile=None, certfile=None[, timeout], context=None, source_address=None)
63+ .. class :: SMTP_SSL(host='', port=0, local_hostname=None, keyfile=None, \
64+ certfile=None [, timeout], context=None, \
65+ source_address=None)
6166
6267 A :class: `SMTP_SSL ` instance behaves exactly the same as instances of
6368 :class: `SMTP `. :class: `SMTP_SSL ` should be used for situations where SSL is
6469 required from the beginning of the connection and using :meth: `starttls ` is
6570 not appropriate. If *host * is not specified, the local host is used. If
66- *port * is zero, the standard SMTP-over-SSL port (465) is used. *keyfile *
71+ *port * is zero, the standard SMTP-over-SSL port (465) is used. The optional
72+ arguments *local_hostname * and *source_address * have the same meaning as
73+ they do in the :class: `SMTP ` class. *keyfile *
6774 and *certfile * are also optional, and can contain a PEM formatted private key
6875 and certificate chain file for the SSL connection. *context * also optional, can contain
6976 a SSLContext, and is an alternative to keyfile and certfile; If it is specified both
@@ -90,7 +97,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
9097 standard SMTP client. It's common to use Unix sockets for LMTP, so our
9198 :meth: `connect ` method must support that as well as a regular host:port
9299 server. The optional arguments local_hostname and source_address have the
93- same meaning as that of SMTP client . To specify a Unix socket, you must use
100+ same meaning as they do in the :class: ` SMTP ` class . To specify a Unix socket, you must use
94101 an absolute path for *host *, starting with a '/'.
95102
96103 Authentication is supported, using the regular SMTP mechanism. When using a Unix
0 commit comments