#35581: Upgrade django.core.mail to use Python's modern email API
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Mike
Type: | Edmunds
Cleanup/optimization | Status: assigned
Component: Core (Mail) | Version: dev
Severity: Normal | Resolution:
Keywords: email, compat32 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mike Edmunds):
* owner: YashRaj1506 => Mike Edmunds
Comment:
@YashRaj1506 I have a bunch of work underway on this and will open a PR
soon. Don't want you to needlessly duplicate effort. Code review on the PR
would be very welcome once it's ready.
Part of the delay is I've run into a handful of open issues in Python's
modern email API that may require further discussion:
- Modern set_content() forces a trailing newline on text content
(https://github.com/python/cpython/issues/121515). I think this is
probably fine, but it touches a lot of tests.
- Security issues in modern header serialization
(https://github.com/python/cpython/issues/80222,
https://github.com/python/cpython/issues/121284). I think these would
block this change.
Also trying to decide how best to handle Django's `EmailMessage.encoding`.
It's not documented, but a bunch of tests cover setting it and checking
the results. (The only relevant docs are
[https://docs.djangoproject.com/en/5.1/topics/email/#:~:text=The%20character%20set%20of%20email%20sent%20with%20django.core.mail%20will%20be%20set%20to%20the%20value%20of%20your%20DEFAULT_CHARSET%20setting.
this note] about the DEFAULT_CHARSET setting also applying to
django.core.mail.)
--
Ticket URL: <https://code.djangoproject.com/ticket/35581#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107019142e40464-d8f891a4-4c6f-4ec9-80ce-f628be622d2e-000000%40eu-central-1.amazonses.com.