~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/email_message.py

  • Committer: Vincent Ladeuil
  • Date: 2010-03-10 09:33:04 UTC
  • mto: (5082.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5083.
  • Revision ID: v.ladeuil+lp@free.fr-20100310093304-4245t4tazd4sxoav
Cleanup test from overly cautious checks.

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
        """