smtplib.SMTPSenderRefused

exception smtplib.SMTPSenderRefused Sender address refused. In addition to the attributes set by on all SMTPResponseException exceptions, this sets ‘sender’ to the string that the SMTP server refused.

smtplib.SMTP_SSL

class smtplib.SMTP_SSL(host='', port=0, local_hostname=None, keyfile=None, certfile=None, [timeout, ]context=None, source_address=None) An SMTP_SSL instance behaves exactly the same as instances of SMTP. SMTP_SSL should be used for situations where SSL is required from the beginning of the connection and using starttls() is not appropriate. If host is not specified, the local host is used. If port is zero, the standard SMTP-over-SSL port (465) is used. The optional arguments local_hostname,

smtplib.SMTPResponseException

exception smtplib.SMTPResponseException Base class for all exceptions that include an SMTP error code. These exceptions are generated in some instances when the SMTP server returns an error code. The error code is stored in the smtp_code attribute of the error, and the smtp_error attribute is set to the error message.

smtplib.SMTPRecipientsRefused

exception smtplib.SMTPRecipientsRefused All recipient addresses refused. The errors for each recipient are accessible through the attribute recipients, which is a dictionary of exactly the same sort as SMTP.sendmail() returns.

smtplib.SMTPNotSupportedError

exception smtplib.SMTPNotSupportedError The command or option attempted is not supported by the server. New in version 3.5.

smtplib.SMTPException

exception smtplib.SMTPException Subclass of OSError that is the base exception class for all the other exceptions provided by this module. Changed in version 3.4: SMTPException became subclass of OSError

smtplib.SMTPDataError

exception smtplib.SMTPDataError The SMTP server refused to accept the message data.

smtplib.SMTPHeloError

exception smtplib.SMTPHeloError The server refused our HELO message.

smtplib.SMTPConnectError

exception smtplib.SMTPConnectError Error occurred during establishment of a connection with the server.

smtplib.SMTP.verify()

SMTP.verify(address) Check the validity of an address on this server using SMTP VRFY. Returns a tuple consisting of code 250 and a full RFC 822 address (including human name) if the user address is valid. Otherwise returns an SMTP error code of 400 or greater and an error string. Note Many sites disable SMTP VRFY in order to foil spammers.