smtplib.SMTPServerDisconnected

exception smtplib.SMTPServerDisconnected This exception is raised when the server unexpectedly disconnects, or when an attempt is made to use the SMTP instance before connecting it to a server.

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.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.SMTPHeloError

exception smtplib.SMTPHeloError The server refused our HELO message.

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.SMTPConnectError

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

smtplib.SMTPAuthenticationError

exception smtplib.SMTPAuthenticationError SMTP authentication went wrong. Most probably the server didn’t accept the username/password combination provided.