Django

Code

Changeset 5854

Show
Ignore:
Timestamp:
08/11/07 07:10:07 (1 year ago)
Author:
mtredinnick
Message:

Fixed #4910 -- Allow Unicode content to be passed in for text-based e-mail
attachments. Thanks, djoume@taket.org.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/mail.py

    r5622 r5854  
    288288        basetype, subtype = mimetype.split('/', 1) 
    289289        if basetype == 'text': 
    290             attachment = SafeMIMEText(content, subtype, settings.DEFAULT_CHARSET) 
     290            attachment = SafeMIMEText(smart_str(content, 
     291                settings.DEFAULT_CHARSET), subtype, settings.DEFAULT_CHARSET) 
    291292        else: 
    292293            # Encode non-text attachments with base64.