l.s.m.s.MailController(object) : class documentation

Part of lp.services.mail.sendmail View In Hierarchy

Known subclasses: lp.services.mail.tests.test_basemailer.RaisingMailController

Message generation interface closer to peoples' mental model.
Method __init__ Undocumented
Method addAttachment Undocumented
Static Method encodeOptimally Encode a message part as needed.
Method makeMessage Undocumented
Method send Undocumented
def __init__(self, from_addr, to_addrs, subject, body, headers=None, envelope_to=None, bulk=True):
Undocumented
def addAttachment(self, content, content_type='application/octet-stream', inline=False, filename=None, charset=None):
Undocumented
@staticmethod
def encodeOptimally(part, exact=True):
Encode a message part as needed.

If the part is more than 10% high-bit characters, it will be encoded using base64 encoding. If the contents are 7-bit and exact is False, the part will not be encoded. Otherwise, the message will be encoded as quoted-printable.

If quoted-printable encoding is used, exact will cause all line-ending characters to be quoted.

ParameterspartThe message part to encode.
exactIf True, the encoding will ensure newlines are not mangled. If False, 7-bit attachments will not be encoded.
def makeMessage(self):
Undocumented
def send(self, bulk=True):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.