| Age | Commit message (Collapse) | Author |
|
Bcc addresses are sent via the SMTP envelope and must never appear in
the message itself. A "Bcc" key in `extra_headers` was not excluded like
From/To/Cc/Reply-To, so it leaked into the generated message as a
visible header.
Thanks Mike Edmunds for reviews.
|
|
|
|
|
|
Revises the AnimalTestCase to better show test data isolation
and avoid the opportunity to use setUpTestData.
|
|
|
|
(a)force_login().
Co-authored-by: Mykhailo Havelia <Arfey17.mg@gmail.com>
|
|
|
|
responses.
Thanks Shai Berger for the report, and Natalia Bidart and Sarah Boyce for reviews.
|
|
Obsolete since 330638b89f14e1fb06e9d313ccc9768ae167c53f.
|
|
|
|
|
|
|
|
This makes the name consistent with the `savepoint_commit` and
`savepoint_rollback` functions. The previous name is maintained as a
deprecated alias.
This also frees up the `savepoint` name, which would allow the context
manager from `django-subatomic` to be included in Django.
Co-authored-by: Lily <code@lilyf.org>
|
|
* Fixed typos related to automated EMAIL_PROVIDERS -> MAILERS renaming.
* Clarified wording in some recently added/updated sections.
* Removed deprecated, extraneous `fail_silently=False` from examples.
* Moved EmailBackend API documentation out of "Email backends" intro
into a dedicated section in email.txt.
* Sorted MAILERS alphabetically in settings.txt.
|
|
See DEP 0018.
Added:
* MAILERS setting.
* django.core.mail.mailers dict-like EmailBackend factory.
* `using` argument to mail sending APIs.
* `sent_using` attribute to mail.outbox messages in locmem backend.
* MAILERS in startproject settings template, set to console backend.
* AdminLogHandler.using argument.
* BrokenLinkEmailsMiddleware.send_mail() method.
Updated:
* BaseEmailBackend to track the MAILERS alias used to construct it, and
to report errors for unknown kwargs (OPTIONS).
* EmailBackend implementations to initialize from kwargs (OPTIONS) only
when MAILERS is being used.
* smtp.EmailBackend to require `host` option and to default `port`
option based on SSL/TLS options.
* SimpleTestCase setup to substitute the locmem backend for all defined
MAILERS configurations.
* Django's tests that send mail to define MAILERS.
Deprecated:
* EMAIL_BACKEND and other backend-related EMAIL_* settings.
* mail.get_connection().
* The `connection`, `fail_silently`, `auth_user`, and `auth_password`
arguments to mail functions.
* The EmailMessage.connection attribute.
* BaseEmailBackend support for `fail_silently`. Backends that support
fail_silently (SMTP, console, file) now implement it directly.
* AdminEmailHandler.email_backend argument.
Removed undocumented features without deprecation:
* EmailMessage.get_connection() method. (send() now raises an error if a
subclass has attempted to override it.)
* EmailMessage.send() no longer sets self.connection to the connection
used for sending. (It still _uses_ a pre-existing self.connection.)
* AdminEmailHandler.connection() method. (Init now raises an error if a
subclass has attempted to override it.)
Thanks to Natalia Bidart for shepherding DEP 0018 and for extensive
reviews and suggestions on the implementation.
Thanks to Jacob Rief for the initial implementation and multiple
iterations while refining the design.
Co-authored-by: Jacob Rief <jacob.rief@gmail.com>
|
|
|
|
Thank you James Walls and James Bligh for reviews.
Co-authored-by: Johannes Maron <johannes@maron.family>
|
|
New default tag `{% csp_nonce_attr %}` was added for explicit CSP nonce
inclusion into `<script>` and `<link>` elements.
`{% csp_nonce_attr %}` renders `nonce="<value>"` when `csp_nonce` is
present in the template context, and renders nothing otherwise.
`{% csp_nonce_attr media %}` renders a `Media` object's assets with the
nonce attr applied to each tag.
Thanks Jacob Walls for the accurate and spot on review comments.
Co-authored-by: Johannes Maron <johannes@maron.family>
|
|
HttpResponseRedirect.
|
|
Where the docs used `:pep:` links for established Python language
features, replaced them with direct references to the Python docs
(usually glossary terms).
|
|
ForeignObject should not be treated as an internal tool. In the past
we made changes in its API with a proper deprecation, e.g.
8b1ff0da4b162e87edebd94e61f2cd153e9e159d.
|
|
* Indented get_connection() details into its function block.
* Updated introductory paragraph to better reflect current capabilities.
* Changed link in "Quick examples" to go to descriptive text rather than
reference for send_mail().
* Avoided implying that send_mail() is only reliable "in most cases."
* Improved description of development SMTP server.
* Expanded information on third-party backends.
* Moved "Email backends" introductory paragraph above API methods and
expanded it to match section content.
|
|
|
|
Moved "Sending multiple emails" from the "Email backends" section to the
"Sending messages" section and renamed it to "Sending many messages
efficiently" to better reflect its content.
Moved the related connection manager example from the "Email backends"
intro into the same section.
|
|
Moved "Obtaining an instance of an email backend" after documentation
for individual backends (matching similar approach in Tasks docs).
|
|
Moved documentation section for each email backend to be a direct child
of "Email backends" (rather than subsections of "Obtaining an instance
of an email backend"). Added a section header for "Third-party backends"
to surface it in the outline and separate it from "Dummy backend."
|
|
Moved the "Preventing header injection" discussion below sections on
EmailMessage and related classes.
|
|
Introduced a top-level "Sending messages" section to group together
send_mail(), send_mass_mail(), mail_admins(), mail_managers(), the
EmailMessage and EmailMultiAlternatives classes, and other topics
related to sending.
|
|
The top-level "Examples" section of docs/topics/email.txt seemed intended
to illustrate the difference between send_mail() and send_mass_mail(),
not to provide general examples of sending email. Moved it into the
existing "send_mass_mail() vs. send_mail()" section.
(There's already a "Quick examples" section at the top of the page with
general examples.)
|
|
|
|
|
|
For use in checking user permissions via has_perm().
Co-authored-by: 사재혁 <jaehyuck.sa.dev@gmail.com>
|
|
request bodies.
Notably that the limit can be bypassed under ASGI.
|
|
Thanks James Bligh for the review.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
Fixed the EmailMessage.message() method signature in the docs to
reinforce that the `policy` argument is keyword-only. (The text already
describes it correctly as keyword-only.)
|
|
A TypeError is now raised if fail_silently=True, auth_user, or auth_password
are provided along a connection.
Updated AdminEmailHandler in django.utils.log to remove redundant
fail_silently=True.
Thanks Mike Edmunds for the report and Jacob Tyler Walls for the review.
|
|
|
|
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
docs/topics/tasks.txt.
|
|
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
|
|
Co-authored-by: Clifford Gama <cliffygamy@gmail.com>
|
|
|
|
in docs/topics/email.txt.
|
|
|
|
As Python 3.12 is now the floor, we can drop the shims and
use the `inspect` module.
|
|
|
|
https://github.com/psf/black/releases/tag/26.1.0
|
|
Deserializer.
Thanks Shai Berger and Natalia Bidart for reviews.
|
|
Following up a forum post and a conversation with the Steering Council,
it was decided to remove the docs/topics/external-packages.txt to avoid
confusion with the Ecosystem page. Relevant content was moved to their
related sections, except for `django-contrib-comments` which is not
actively maintained.
Thank you Tim Schilling for the review.
|