django/docs/internals
Mike Edmunds 9ab1991689 Fixed #35581 -- Updated django.core.mail to Python's modern email API.
- Changed EmailMessage.message() to construct a "modern email API"
  email.message.EmailMessage and added policy keyword arg.
- Added support for modern MIMEPart objects in EmailMessage.attach()
  (and EmailMessage constructor, EmailMessage.attachments list).
- Updated SMTP EmailBackend to use modern email.policy.SMTP.

Deprecated:
- Attaching MIMEBase objects (replace with MIMEPart)
- BadHeaderError (modern email uses ValueError)
- SafeMIMEText, SafeMIMEMultipart (unnecessary for modern email)
- django.core.mail.forbid_multi_line_headers()
  (undocumented, but exposed via `__all__` and in wide use)
- django.core.mail.message.sanitize_address()
  (undocumented, but in wide use)

Removed without deprecation (all undocumented):
- EmailMessage.mixed_subtype
- EmailMultiAlternatives.alternative_subtype
- Support for setting (undocumented) EmailMessage.encoding property
  to a legacy email.charset.Charset object

Related changes:
- Dropped tests for incorrect RFC 2047 encoding of non-ASCII email
  address localparts. This is specifically prohibited by RFC 2047, and
  not supported by any known MTA or email client. (Python still
  mis-applies encoded-word to non-ASCII localparts, but it is a bug that
  may be fixed in the future.)
- Added tests that try to discourage using Python's legacy email APIs
  in future updates to django.core.mail.
2025-07-25 13:50:02 +02:00
..
_images Improved readability of triage workflow image by increasing its size and color contrast. 2024-10-25 10:00:33 +02:00
contributing Fixed #36500 -- Set flake8 max-doc-length config to 79 columns. 2025-07-23 20:17:55 -03:00
deprecation.txt Fixed #35581 -- Updated django.core.mail to Python's modern email API. 2025-07-25 13:50:02 +02:00
git.txt Refs #32720 -- Updated various links in docs to avoid redirects and use HTTPS. 2021-05-17 09:46:09 +02:00
howto-release-django.txt Fixed indentation in docs/internals/howto-release-django.txt. 2025-06-27 09:46:17 -03:00
index.txt Replaced docs/internals/team.txt with DSF teams page. 2017-03-14 16:36:44 -04:00
mailing-lists.txt Fixed #35908 -- Retired the django-developers and django-users mailing lists. 2025-02-19 12:14:27 +01:00
organization.txt Fixed #35908 -- Retired the django-developers and django-users mailing lists. 2025-02-19 12:14:27 +01:00
release-process.txt Updated the release process documentation to reflect the current process. 2025-01-28 10:32:58 +00:00
security.txt Clarified that only latest dependency versions are valid for security reports. 2025-06-18 11:04:34 -03:00