Part of lp.code.mail.branch View In Hierarchy
Known subclasses: lp.code.mail.branchmergeproposal.BMPMailer
Method | __init__ | Constructor. |
Class Method | forBranchModified | Construct a BranchMailer for mail about a branch modification. |
Class Method | forRevision | Construct a BranchMailer for mail about branch revisions. |
Method | _getHeaders | Return the mail headers to use. |
Method | _getTemplateParams | Return a dict of values to use in the body and subject. |
Method | _includeDiff | Determine whether to include a diff, and explanation. |
Method | _explainNotPresentDiff | Provide an explanation why the diff is not being included. |
Method | _addAttachments | Attach the diff, if present and not too large. |
Inherited from BaseMailer:
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 | _getTemplateName | Return the name of the template to use for this email body. |
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 | branch | The branch that was modified. |
user | The user making the change. | |
delta | an IBranchDelta representing the modification as visible to people who cannot edit the branch. | |
delta_for_editors | an IBranchDelta representing the
notification as visible to people who can edit the branch. If
None, delta is used for people who can edit the branch too. | |
Returns | a BranchMailer. |
Parameters | branch | The db_branch that was modified. |
revno | The revno of the revision this message is about. | |
from_address | The email address this message should come from. | |
contents | The contents of the message. | |
subject | The subject of the message | |
diff | The diff of this revision versus its parent, as text. | |
Returns | a BranchMailer. |
Explanation is provided if the diff is wanted and present, but is too large.
No explanation is provided where the diff is empty or where the user has requested to never have diffs sent.
Parameters | ctrl | The MailController to attach the diff to. |
Email address of the recipient. |