Ticket #4910: fix_attachment_encoding.diff
File fix_attachment_encoding.diff, 686 bytes (added by , 17 years ago) |
---|
-
django/core/mail.py
287 287 mimetype = DEFAULT_ATTACHMENT_MIME_TYPE 288 288 basetype, subtype = mimetype.split('/', 1) 289 289 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) 291 292 else: 292 293 # Encode non-text attachments with base64. 293 294 attachment = MIMEBase(basetype, subtype)