django/tests/mail
Michael Schwarz 72d541b61c Fixed #27007 -- Handled non-UTF-8 bytes objects for text/* attachments.
The fallback logic which allows non-UTF-8 encoded files to be passed to
attach_file() even when a `text/*` mime type has been specified is
moved to attach(). Both functions now fall back to a content type of
`application/octet-stream`.

A side effect is that a file's content is decoded in memory instead of
opening it in text mode and reading it into a string.

Some mimetype-related logic in _create_attachment() has become
obsolete as the code moved from attach_file() to attach() already
handles this.
2016-08-12 16:35:09 -04:00
..
attachments Fixed #24623 -- Fixed EmailMessage.attach_file() with text files on Python 3. 2015-07-25 07:42:30 -04:00
__init__.py Removed unneeded imports in tests's __init__.py and unified them. 2013-09-09 23:01:07 +02:00
custombackend.py Fixed several typos in Django 2014-05-28 17:39:14 -07:00
test_sendtestemail.py Fixed #24970 -- Added --managers and --admins options to the sendtestemail management command. 2015-06-22 07:21:26 -04:00
tests.py Fixed #27007 -- Handled non-UTF-8 bytes objects for text/* attachments. 2016-08-12 16:35:09 -04:00