Part of lp.services.mail.basemailer View In Hierarchy
Known subclasses: lp.code.mail.branch.BranchMailer, lp.code.mail.sourcepackagerecipebuild.SourcePackageRecipeBuildMailer, lp.registry.mail.teammembership.TeamMembershipMailer, lp.services.mail.tests.test_basemailer.BaseMailerSubclass, lp.snappy.mail.snapbuild.SnapBuildMailer, lp.soyuz.mail.binarypackagebuild.BinaryPackageBuildMailer, lp.soyuz.mail.livefsbuild.LiveFSBuildMailer, lp.soyuz.mail.packageupload.PackageUploadMailer
Subclasses must provide getReason (or reimplement _getTemplateParameters or generateEmail).
It is expected that subclasses may override _getHeaders, _getTemplateParams, and perhaps _getBody.
Method | __init__ | Constructor. |
Method | generateEmail | Generate the email for this recipient. |
Method | textDelta | Return a textual version of the class delta. |
Method | sendOne | Send notification to one recipient. |
Method | sendAll | Send notifications to all recipients. |
Method | _getFromAddress | Undocumented |
Method | _getToAddresses | Undocumented |
Method | _getSubject | The subject template expanded with the template params. |
Method | _getReplyToAddress | Return the address to use for the reply-to header. |
Method | _getHeaders | Return the mail headers to use. |
Method | _addAttachments | Add any appropriate attachments to a MailController. |
Method | _getTemplateName | Return the name of the template to use for this email body. |
Method | _getTemplateParams | Return a dict of values to use in the body and subject. |
Method | _getBody | Return the complete body to use for this email. |
Method | _getFooter | Provide a footer to attach to the body, or None. |
Method | _getExpandedFooter | Provide an expanded footer for recipients who have requested it. |
Parameters | subject | A Python dict-replacement template for the subject line of the email. |
template | Name of the template to use for the message body. | |
recipients | A dict of recipient to Subscription. | |
from_address | The from_address to use on emails. | |
delta | A Delta object with members "delta_values", "interface" and "new_values", such as BranchMergeProposalDelta. | |
message_id | The Message-Id to use for generated emails. If not supplied, random message-ids will be used. | |
mail_controller_class | The class of the mail controller to
use to send the mails. Defaults to MailController . | |
request | An optional IErrorReportRequest to use when
logging OOPSes. | |
wrap | Wrap body text using MailWrapper . | |
force_wrap | See MailWrapper.format . |
Parameters | Email address of the recipient to send to. | |
recipient | The Person to send to. | |
Returns | (headers, subject, body) of the email. |
Default implementation does nothing. :param ctrl: The MailController to add attachments to. :param email: The email address of the recipient.