mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-23 13:11:04 -05:00
Drop Python 2 and Django 1.11 support
Minimum supported versions are now Django 2.0, Python 3.5. This touches a lot of code, to: * Remove obsolete portability code and workarounds (six, backports of email parsers, test utils, etc.) * Use Python 3 syntax (class defs, raise ... from, etc.) * Correct inheritance for mixin classes * Fix outdated docs content and links * Suppress Python 3 "unclosed SSLSocket" ResourceWarnings that are beyond our control (in integration tests due to boto3, python-sparkpost)
This commit is contained in:
@@ -26,18 +26,18 @@ The first approach is usually the simplest. The other two can be
|
||||
helpful if you are working with Python development tools that
|
||||
offer type checking or other static code analysis.
|
||||
|
||||
Availability of these features varies by ESP, and there may be additional
|
||||
limitations even when an ESP does support a particular feature. Be sure
|
||||
to check Anymail's docs for your :ref:`specific ESP <supported-esps>`.
|
||||
If you try to use a feature your ESP does not offer, Anymail will raise
|
||||
an :ref:`unsupported feature <unsupported-features>` error.
|
||||
|
||||
|
||||
.. _anymail-send-options:
|
||||
|
||||
ESP send options (AnymailMessage)
|
||||
---------------------------------
|
||||
|
||||
Availability of each of these features varies by ESP, and there may be additional
|
||||
limitations even when an ESP does support a particular feature. Be sure
|
||||
to check Anymail's docs for your :ref:`specific ESP <supported-esps>`.
|
||||
If you try to use a feature your ESP does not offer, Anymail will raise
|
||||
an :ref:`unsupported feature <unsupported-features>` error.
|
||||
|
||||
.. class:: AnymailMessage
|
||||
|
||||
A subclass of Django's :class:`~django.core.mail.EmailMultiAlternatives`
|
||||
@@ -167,7 +167,7 @@ ESP send options (AnymailMessage)
|
||||
|
||||
ESPs have differing restrictions on tags. For portability,
|
||||
it's best to stick with strings that start with an alphanumeric
|
||||
character. (Also, Postmark only allows a single tag per message.)
|
||||
character. (Also, a few ESPs allow only a single tag per message.)
|
||||
|
||||
|
||||
.. caution::
|
||||
@@ -359,7 +359,7 @@ ESP send status
|
||||
* `'queued'` the ESP has accepted the message
|
||||
and will try to send it asynchronously
|
||||
* `'invalid'` the ESP considers the sender or recipient email invalid
|
||||
* `'rejected'` the recipient is on an ESP blacklist
|
||||
* `'rejected'` the recipient is on an ESP suppression list
|
||||
(unsubscribe, previous bounces, etc.)
|
||||
* `'failed'` the attempt to send failed for some other reason
|
||||
* `'unknown'` anything else
|
||||
@@ -402,7 +402,8 @@ ESP send status
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# This will work with a requests-based backend:
|
||||
# This will work with a requests-based backend,
|
||||
# for an ESP whose send API provides a JSON response:
|
||||
message.anymail_status.esp_response.json()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user