@@ -26,7 +26,10 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
26
26
An :class: `SMTP ` instance encapsulates an SMTP connection. It has methods
27
27
that support a full repertoire of SMTP and ESMTP operations. If the optional
28
28
*host * and *port * parameters are given, the SMTP :meth: `connect ` method is
29
- called with those parameters during initialization. If specified,
29
+ called with those parameters during initialization.If *host * is omitted or
30
+ an empty string, no connection is made during initialization; you must
31
+ call :meth: `connect ` manually before using the instance.
32
+ If *port * is zero, the default SMTP port (25) is used. If specified,
30
33
*local_hostname * is used as the FQDN of the local host in the HELO/EHLO
31
34
command. Otherwise, the local hostname is found using
32
35
:func: `socket.getfqdn `. If the :meth: `connect ` call returns anything other
@@ -81,7 +84,10 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
81
84
An :class: `SMTP_SSL ` instance behaves exactly the same as instances of
82
85
:class: `SMTP `. :class: `SMTP_SSL ` should be used for situations where SSL is
83
86
required from the beginning of the connection and using :meth: `starttls ` is
84
- not appropriate. If *host * is not specified, the local host is used. If
87
+ not appropriate. If the optional *host * and *port * parameters are given, the
88
+ SMTP_SSL :meth: `connect ` method is called with those parameters during initialization.
89
+ If *host * is omitted or an empty string, no connection is made during initialization;
90
+ you must call :meth: `connect ` manually before using the instance. If
85
91
*port * is zero, the standard SMTP-over-SSL port (465) is used. The optional
86
92
arguments *local_hostname *, *timeout * and *source_address * have the same
87
93
meaning as they do in the :class: `SMTP ` class. *context *, also optional,
0 commit comments