ValueError to prevent the creation of a non-blocking socket class smtplib. Like this, the SMTP QUIT command is issued automatically when theĬhanged in version 3.9: If the timeout parameter is set to be zero, it will raise a The SMTP class supports the with statement. Respectively) the OS default behavior will be used.įor normal use, you should only require the initialization/connect, If omitted (or if host or port are '' and/or 0 (host, port), for the socket to bind to as its source address beforeĬonnecting. Interfaces, and/or to some specific source TCP port. To some specific source address in a machine with multiple network The optional source_address parameter allows binding Like the connection attempt (if not specified, the global default timeout Timeout parameter specifies a timeout in seconds for blocking operations Than a success code, an SMTPConnectError is raised. If the connect() call returns anything other Otherwise, the local hostname is found using Local_hostname is used as the FQDN of the local host in the HELO/EHLOĬommand. Host and port parameters are given, the SMTP connect() method isĬalled with those parameters during initialization. That support a full repertoire of SMTP and ESMTP operations. SMTP ( host='', port=0, local_hostname=None, source_address=None ) ¶Īn SMTP instance encapsulates an SMTP connection. WebAssembly platforms for more information. This module does not work or is not available on WebAssembly platforms
0 Comments
Leave a Reply. |