b.s.SMTPConnection(object) : class documentation

Part of bzrlib.smtp_connection View In Hierarchy

Connect to an SMTP server and send an email.

This is a gateway between bzrlib.config.Config and smtplib.SMTP. It understands the basic bzr SMTP configuration information: smtp_server, smtp_username, and smtp_password.

Method __init__ Undocumented
Static Method get_message_addresses Get the origin and destination addresses of a message.
Method send_email Send an email message.
Method _connect If we haven't connected, connect and authenticate.
Method _create_connection Create an SMTP connection.
Method _authenticate If necessary authenticate yourself to the server.
def __init__(self, config, _smtp_factory=None):
Undocumented
def _connect(self):
If we haven't connected, connect and authenticate.
def _create_connection(self):
Create an SMTP connection.
def _authenticate(self):
If necessary authenticate yourself to the server.
@staticmethod
def get_message_addresses(message):
Get the origin and destination addresses of a message.
ParametersmessageA message object supporting get() to access its headers, like email.Message or bzrlib.email_message.EmailMessage.
ReturnsA pair (from_email, to_emails), where from_email is the email address in the From header, and to_emails a list of all the addresses in the To, Cc, and Bcc headers.
def send_email(self, message):
Send an email message.

The message will be sent to all addresses in the To, Cc and Bcc headers.

ParametersmessageAn email.Message or email.MIMEMultipart object.
ReturnsNone
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.