~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/email_message.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-03-25 00:02:51 UTC
  • mfrom: (5106.1.1 version-bump)
  • Revision ID: pqm@pqm.ubuntu.com-20100325000251-bwsv5c5d3l9x3lnn
(Jelmer) Bump API version for 2.2.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""A convenience class around email.Message and email.MIMEMultipart."""
18
18
 
19
 
from __future__ import absolute_import
20
 
 
21
19
from email import (
22
20
    Header,
23
21
    Message,
149
147
 
150
148
    @staticmethod
151
149
    def send(config, from_address, to_address, subject, body, attachment=None,
152
 
             attachment_filename=None, attachment_mime_subtype='plain'):
 
150
            attachment_filename=None, attachment_mime_subtype='plain'):
153
151
        """Create an email message and send it with SMTPConnection.
154
152
 
155
153
        :param config: config object to pass to SMTPConnection constructor.
183
181
    def string_with_encoding(string_):
184
182
        """Return a str object together with an encoding.
185
183
 
186
 
        :param string\\_: A str or unicode object.
 
184
        :param string_: A str or unicode object.
187
185
        :return: A tuple (str, encoding), where encoding is one of 'ascii',
188
186
            'utf-8', or '8-bit', in that preferred order.
189
187
        """