| Age | Commit message (Collapse) | Author |
|
- 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.
|
|
https://github.com/psf/black/releases/tag/24.1.0
|
|
|
|
by default.
Regression in 2848e5d0ce5cf3c31fe87525536093b21d570f69.
|
|
keyfile and certfile parameters were removed in Python 3.12, see
https://github.com/python/cpython/commit/ef0e72b31d22f780d3a165d7d0471806061fe380
|
|
|
|
Used more specific errors (e.g. FileExistsError) as appropriate.
|
|
empty/error cases.
|
|
|
|
|
|
|
|
starttls(), login(), and other connection methods already call
the method as needed.
|
|
|
|
error.
|
|
connection failure.
|
|
Passing an Unicode string on Python 2 was crashing the connection.
Thanks slavugan@gmail.com for the report, and Tim Graham for the review.
|
|
the address.
On Python 3, sending emails failed for addresses containing non-ASCII
characters due to the usage of the legacy Python email.utils.formataddr()
function. This is fixed by using the proper Address object on Python 3.
|
|
|
|
RFC.
|
|
|
|
Thanks jwmayfield, serg.partizan, and Wojciech Banaś for work on the patch.
|
|
This is quite important otherwise we don't close our connections to the
SMTP server.
|
|
This is to provide a consistent interface (namely bytes) for the smtp
backend which after all sends bytes over the wire; encoding with as_string
yields different results since mails as unicode are not really specified.
as_string stays for backwardscompatibilty mostly and some debug outputs.
But keep in mind that the output doesn't match as_bytes!
|
|
Refs #21271.
|
|
Thanks Tobias McNulty and Tim Graham for discussions and code review.
Thanks Andre Cruz the suggestion and initial patch.
|
|
Thanks to berkerpeksag for the report and to claudep
for the review.
|
|
Thanks dj.facebook at gmail.com for the report and initial patch
and Areski Belaid and senko for improvements.
|
|
The exact conditions on which this exception is raised are not
known, but this replacement is the best guess we can do at this
point.
|
|
Thanks Sebastian Noack for the report and the initial patch.
|
|
Thanks Sebastian Noack for the report and the initial patch.
|
|
Thanks alex_po for the report and Luke Plant for the analysis.
|
|
|
|
LeandroSouza and bedmondmark.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
mail recipients. Patch also improves the IDN handling introduced by r15006, and refactors the test suite to ensure even feature coverage. Thanks to net147 for the report, and to Łukasz Rekucki for the awesome patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
characters in email addresses. Thanks, Claude Peroz and Andi Albrecht.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15006 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
Thanks to aromano for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
Thanks to Andi Albrecht for his work on this patch, and to everyone else that contributed during design and development.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11709 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|