| Age | Commit message (Collapse) | Author |
|
* 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.)
|
|
|
|
|
|
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.
|
|
in docs/topics/email.txt.
|
|
1. Added imports and setup for clarity.
2. Removed adding `<` and `>` to Content-ID, as `make_msgid()` already
includes them.
3. Removed `$` from reference in HTML, and instead stripped `<>` there, as
required by HTML `cid:` references.
|
|
Co-authored-by: Clifford Gama <cliffygamy@gmail.com>
|
|
|
|
|
|
|
|
Thanks Mike Edmunds for the report.
|
|
Updated docs for class django.core.mail.EmailMessage to use Sphinx
`method::` directives, allowing cross references to those methods
elsewhere in the docs.
Updated references to those methods in the email docs and 6.0 release
notes to link directly to the specific methods.
|
|
docs/topics/email.txt declares `module:: django.core.mail`.
Removed unnecessary `currentmodule::` pointing to the same module.
|
|
Signed-off-by: SaJH <wogur981208@gmail.com>
|
|
Lines in the docs files were manually adjusted to conform to the
79 columns limit per line (plus newline), improving readability and
consistency across the content.
|
|
docs.
|
|
- 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.
|
|
|
|
Reordered the keyword-only EmailMessage parameters in the documentation
to group similar options together and move rarely used options later.
Used keywords for *all* parameters in EmailMessage examples to improve
clarity.
|
|
In public mail APIs, changed less frequently used parameters from
keyword-or-positional to keyword-only, emitting a warning during the
required deprecation period.
|
|
django.core.mail.get_connection() has always supported only variable
keyword arguments (never variable positional arguments).
|
|
This bumps minimum supported versions of 3rd-party packages to the first
releases to support Python 3.12.
|
|
send_messages().
|
|
docs/topics/email.txt.
Co-authored-by: Mike Edmunds <medmunds@gmail.com>
|
|
|
|
attachments and alternatives.
|
|
|
|
|
|
EmailMultiAlternatives.alternatives to use namedtuples.
This makes it more descriptive to pull out the named fields.
|
|
|
|
|
|
Thanks to J.V. Zammit, Paolo Melchiorre, and Mariusz Felisiak for
reviews.
|
|
|
|
Follow up to 569a33579c3cca5f801c544d9b52a34e3c779424.
|
|
|
|
|
|
This also removes unnecessary comments with the previous spelling.
AP Stylebook has a short entry to advise the preferred spelling for
"en-us". "Afterwards" is preferred in British English.
|
|
|
|
|
|
|
|
|
|
|