~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/email_message.py

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

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