If no version-specific tests.test_settings.settings* file
exists for the current Django version, fall back to an
earlier settings file.
- runtests.py find latest settings_N_M earlier than or
matching Django version N.M being tested, rather than
requiring exact match
- remove test_settings files that were just duplicates
of earlier versions
Work around recent (unannounced) Sendinblue API change
that caused "Invalid headers" API error with non-string
custom header values, by converting basic numeric types
to strings. (Borrowed code from SendGrid backend.)
Fixes#288
Workaround for Django multipart/form-data limitation
where certain attachment filenames cause fields to be dropped
or to end up in request.POST rather than request.FILES.
Handle the MultiValueDictKeyError in inbound webhooks when
this has occurred. Also update docs to recommend avoiding
the problem by using Mailgun and SendGrid's "raw MIME" options.
Also handle reported cases of empty, duplicate keys in Mailgun's
content-id-map.
Fixes#272
Remove `AnymailError.describe_send`, which added sender and
recipient email addresses to every AnymailError message
(whether or not relevant to the error).
Addresses #245
Improve handling of alternative parts and `content_subtype`
to match how Django's SMTP backend handles some unusual cases.
Change Test backend to support (and record) text/* alternative
parts. (But still reject other types of alternatives.)
Fixes#252
* Split test, integration-test, and release workflows,
simplifying config and logic for each.
* Use environment to separate secrets for release workflow.
* Update test matrix with newer Django and Python versions.
Postmark uses their ErrorCode 300 to report several different
send-time validation errors, some of which identify invalid
recipients that need to be handled specially, but many of which
are ordinary API errors.
Rework the logic for parsing ErrorCode 300 error messages:
Handle only "Invalid 'To'" or "Error parsing 'To'" (or 'Cc'
or 'Bcc') as recipient errors. Otherwise raise an API error.
Fixes#238 silent failure when sending with long metadata keys.
Allow inbound and tracking webhooks using SNS topics from any AWS region.
The topic subscription must be confirmed in the topic's own region (not
the boto3 default), determined by examing the topic's ARN.
Fixes#235
* Omit default_app_config under Django 3.2 and later
to avoid DeprecationWarning
* Also adds testing on Python 3.9, 3.10-alpha
* Also updates test matrix to include all supported
Python versions (some older Django versions expanded
Python support in patch releases)
Catch invalid message_id and status when initializing
AnymailRecipientStatus, so problems with ESP response
are caught earlier (in individual backend
parse_recipient_status, rather than base backend _send).
Related changes:
* remove Travis-CI config; stop running tests on Travis
* rename live integration test environment variables
to all start with `ANYMAIL_TEST_` (simplifies tox config)
SparkPost's API no longer allows this, and now returns
a confusing error message about return_path.
(Not treating as a breaking change in Anymail, because
the breaking change was in the SparkPost API. This just
improves the error message in the unlikely event anyone
is trying to use this feature.)
Closes#212
Switch from the (now unmaintained) python-sparkpost
client library to a requests-based backend that calls
SparkPost's Transmissions API directly.
Also adds support for text/x-amp-html alternative parts
(which are supported by the SparkPost API, but weren't
by the client library).
Closes#203
Switch from Mailjet's older v3.0 Send API to the newer v3.1 version.
This is a breaking change for code using the Mailjet backend and:
* Using `esp_extra`, which must be updated to the new API format
* Using multiple `reply_to` addresses, which the v3.1 API doesn't allow
Closes#81
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)
SparkPost has a very small monthly send allowance (and no
API test mode), so limit the number of recipients in live
integration tests to avoid running through our whole quota.
This means we aren't fully testing cc and bcc handling like
we're able to for other ESPs.
Fix a crash or text-mangling issue when an inbound message
uses a charset other than utf-8 for its text or html body,
and SendGrid's "post raw" inbound parse option is *not*
enabled.
Update docs to recommend "post raw" option.
Fixes#187
Fix TypeError when sending to or from addresses with
display names containing commas. Rewrite Anymail's
workaround for Mailjet's problem with commas in display
names, to avoid calling Django's internal sanitize_address
in an unsupported way.
The TypeError results from Django changes that will be
introduced in Django 2.2.15, 3.0.9, and 3.1.
* Add Django 3.1 builds
* Django main is now 3.2dev; add test settings
* Rough in changelog deprecation notice for Django 1.11
and Python 2.7
* Travis-CI is apparently supporting pypy3 alias now
* Travis-CI has apparently added Python 3.8 release now
In SendGrid backend, support non-batch template send to multiple
recipients when `merge_global_data` is set without `merge_data`.
Regression introduced in v6.0.
Fixes#179