~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/mail/basemailer.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-15 10:35:32 UTC
  • mfrom: (14517.1.3 new-bzr)
  • Revision ID: launchpad@pqm.canonical.com-20111215103532-q2m4uyk0r8ugiayx
[r=sinzui, poolie][bug=509016] Always load foreign plugins,
 but restrict probers to avoid accidentally opening foreign branches.
 (re-land)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
"""Base class for sending out emails."""
30
30
    _getTemplateParams, and perhaps _getBody.
31
31
    """
32
32
 
33
 
    app = None
34
 
 
35
33
    def __init__(self, subject, template_name, recipients, from_address,
36
34
                 delta=None, message_id=None, notification_type=None,
37
35
                 mail_controller_class=None):
134
132
 
135
133
    def _getBody(self, email, recipient):
136
134
        """Return the complete body to use for this email."""
137
 
        template = get_email_template(self._template_name, app=self.app)
 
135
        template = get_email_template(self._template_name)
138
136
        params = self._getTemplateParams(email, recipient)
139
137
        body = template % params
140
138
        footer = self._getFooter(params)