b.m.MailClient(object) : class documentation

Part of bzrlib.mail_client View In Hierarchy

Known subclasses: bzrlib.mail_client.BodyExternalMailClient, bzrlib.mail_client.DefaultMail, bzrlib.mail_client.Editor, bzrlib.tests.test_merge_directive.HookMailClient

A mail client that can send messages with attachements.
Method __init__ Undocumented
Method compose Compose (and possibly send) an email message
Method compose_merge_request Compose (and possibly send) a merge request
Method _get_merge_prompt Generate a prompt string. Overridden by Editor.
def __init__(self, config):
Undocumented
def compose(self, prompt, to, subject, attachment, mime_subtype, extension, basename=None, body=None):
Compose (and possibly send) an email message

Must be implemented by subclasses.

ParameterspromptA message to tell the user what to do. Supported by the Editor client, but ignored by others
toThe address to send the message to
subjectThe contents of the subject line
attachmentAn email attachment, as a bytestring
mime_subtypeThe attachment is assumed to be a subtype of Text. This allows the precise subtype to be specified, e.g. "plain", "x-patch", etc.
extensionThe file extension associated with the attachment type, e.g. ".patch"
basenameThe name to use for the attachment, e.g. "send-nick-3252"
def compose_merge_request(self, to, subject, directive, basename=None, body=None):
Compose (and possibly send) a merge request
ParameterstoThe address to send the request to
subjectThe subject line to use for the request
directiveA merge directive representing the merge request, as a bytestring.
basenameThe name to use for the attachment, e.g. "send-nick-3252"
def _get_merge_prompt(self, prompt, to, subject, attachment):
Generate a prompt string. Overridden by Editor.
ParameterspromptA string suggesting what user should do
toThe address the mail will be sent to
subjectThe subject line of the mail
attachmentThe attachment that will be used
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.