Commit Graph

770 Commits

Author SHA1 Message Date
Mike Edmunds
5fdc285e82 CI/Docs: move to anymail.dev
Move all integration tests and contact emails to anymail.dev. 
(Stop using anymail.info.)
2022-02-02 13:59:09 -08:00
medmunds
4d93183e5e CI: get GitHub test matrix from tox envlist
Stop maintaining duplicate (and often not-quite-
in-sync) test matrices in tox.ini and test.yml.
2022-01-30 11:11:41 -08:00
medmunds
3572ec59c9 Release 8.5 2022-01-19 14:57:24 -08:00
medmunds
bb8e583f06 Tests: clean up env var handling
* Replace deprecated strtobool
* Strip whitespace from env values
2022-01-19 14:54:29 -08:00
medmunds
d3730f08a2 Docs: cover testing tracking and inbound webhooks 2022-01-19 14:49:50 -08:00
medmunds
a868bf3bca Docs: cover Postmark limitation on track_opens
Note that Postmark doesn't support `track_opens = False`
when open tracking is enabled at the server level.
(But does support the opposite usage.)
2022-01-19 14:49:50 -08:00
medmunds
2b146c12d3 Docs: update intersphinx links
* Python 3.7 --> 3.10
* Requests has moved again
2022-01-19 14:49:50 -08:00
medmunds
dc0a46a815 Feature: add is_batch_send to anymail_test_params
Make it easier for tests to check whether messages
would fall under Anymail's batch-send logic.

See #249.
2022-01-11 19:54:39 -08:00
medmunds
10f569cd50 Fix: don't include sender/recipient in AnymailError description
Remove `AnymailError.describe_send`, which added sender and
recipient email addresses to every AnymailError message
(whether or not relevant to the error).

Addresses #245
2022-01-11 17:03:03 -08:00
medmunds
60fbe1e896 Fix: treat first text/plain alternative as plaintext body
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
2022-01-10 15:35:00 -08:00
Andrew Chen Wang
28247ec042 Packaging: Update trove classifiers 2022-01-10 13:57:21 -08:00
medmunds
e8a802b7ad CI: Upgrade skip-duplicates in integration tests 2022-01-10 13:42:45 -08:00
medmunds
8b0425f784 CI: Refactor workflows, update test matrix
* 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.
2022-01-10 13:42:45 -08:00
medmunds
26d2b5caa0 Release 8.4 2021-06-15 16:34:12 -07:00
Mike Edmunds
d79c3c2c05 Automate release process
Update GitHub workflow to automatically release
when tagged with v* (following successful tests).
2021-06-15 16:23:08 -07:00
Mike Edmunds
adc92f037b Tests: tox and mock cleanup
* Remove mock dependency
  (mock is now part of standard unittest package)
* Cleanup tox dependency installation logic
2021-06-13 12:13:31 -07:00
Tilmann Becker
e90c10b546 Add Postal support
Thanks to @tiltec for researching, implementing, testing and documenting it.
2021-06-07 17:11:35 -07:00
medmunds
f831fe814a Release 8.3 2021-05-19 13:51:45 -07:00
medmunds
67bf5a5912 CI: split lint, docs jobs
(They had been combined to minimize Travis-CI jobs;
not an issue with GitHub Workflows.)
2021-05-19 13:48:22 -07:00
medmunds
3a03b196b8 Tests: run Django 3.2 first
Update tox.ini for Django 3.2 release
2021-05-19 13:48:22 -07:00
Mike Edmunds
0a4a2cfd56 Docs: upgrade docs build tooling
(And shush Dependabot about Pygments vulnerabilities
in lexers we don't use.)
2021-05-19 13:40:11 -07:00
Mike Edmunds
44754c908e Postmark: fix silent failures for send-time validation errors
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.
2021-05-19 13:15:34 -07:00
Mike Edmunds
b1a4f9809a Amazon SES: confirm webhook subscriptions in SNS topic's own region (#236)
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
2021-04-11 13:02:56 -07:00
Mike Edmunds
a08052e7f8 Update tox for Django dev branch install
Django has renamed their dev branch to "main".

(Also clean up some version reporting.)
2021-03-10 09:57:13 -08:00
medmunds
f4c99abddf Postmark: Fix incorrect single 'to' handling with template but no merge data
Fixes #227
2021-02-24 12:30:05 -08:00
medmunds
7ff647c303 Docs: show Postmark MessageStream example 2021-02-24 12:30:05 -08:00
medmunds
9ed5ce0213 Postmark: Fix API error with template but no merge data
Fixes #223
2021-02-22 17:50:46 -08:00
Mike Edmunds
fd9fdb9b03 Drop pipenv
To install the development environment (inside your preferred venv), 
now just use `pip install -e '.[dev,test]'`.
2021-02-20 13:37:44 -08:00
medmunds
4dd1d3b1fe Release 8.2 2021-01-27 14:43:44 -08:00
medmunds
4f349358bd Docs: document AMPHTML
* Add general instructions for sending AMP Email
  with Django
* Document ability of Amazon SES and SendGrid backends
  to send AMPHTML (via arbitrary alternative parts)
* Add AMP Email row to ESP support table
2021-01-27 14:37:16 -08:00
medmunds
d1ef61d3ba Mailgun: add AMPHTML support 2021-01-27 14:37:16 -08:00
medmunds
d33c9ea4ed Mailgun: improve API error messages 2021-01-27 14:37:16 -08:00
medmunds
2196ab8330 Docs: update Mailgun links and examples 2021-01-27 14:37:16 -08:00
medmunds
a522fb9f60 CI: don't run duplicate tests on PRs
Use skip-duplicate-actions to avoid re-running
tests if code hasn't changed. (Also avoids running
tests twice on push that opens a PR.)
2021-01-26 13:55:17 -08:00
medmunds
614eb9e5ce Expand GitHub contributing info 2021-01-26 13:55:17 -08:00
medmunds
951037a5c2 Docs: invert help page
Move contact options above troubleshooting
2021-01-26 13:55:17 -08:00
medmunds
6c8a779ce1 Docs: add inline search form on help page
Referring to "the search docs box on the left"
doesn't make sense on mobile (which hides search
in the hamburger menu). Instead, just include
a search form at that point in the (html) docs.
2021-01-26 13:55:17 -08:00
medmunds
e523df35d1 Docs: point questions to GitHub Discussions
For questions and help with errors, recommend
GitHub Discussions rather than Stack Overflow.
2021-01-26 13:55:17 -08:00
medmunds
f039366bf0 Test against Django 3.2 prerelease
* 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)
2021-01-26 13:55:17 -08:00
medmunds
fb5912f0e7 Internal: validate AnymailRecipientStatus at init
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).
2021-01-26 13:55:17 -08:00
Omen Apps
3e0056fa2f Added missing comma in example code 2020-12-28 10:37:00 -08:00
Mike Edmunds
6d0374e1ce Docs: Note Mailgun inbound requires forward action
Clarify that Anymail inbound webhook doesn't
support Mailgun's store action.

Closes #132
2020-12-02 13:44:30 -08:00
medmunds
75313c2aa2 Enable CI tests on pull requests 2020-12-01 12:11:44 -08:00
Mike Edmunds
5cbaa24002 Move CI testing to GitHub Actions
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)
2020-11-28 18:08:01 -08:00
Mike Edmunds
8c1749c6f3 SparkPost: drop support for multiple from_email (#213)
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
2020-11-28 18:02:59 -08:00
medmunds
a7ea862ff1 Release 8.1 2020-10-09 12:07:00 -07:00
slinkymanbyday
b9fdd3a37e SparkPost: initial open and AMP tracking events
* Add SPARKPOST_TRACK_INITIAL_OPEN_AS_OPENED boolean
  setting, default False, controlling whether to report
  SparkPost "Initial Open" events as Anymail "opened".
* Add mapping for SparkPost "AMP Click", "AMP Open",
  and "AMP Initial Open" events.
* Update outdated doc references to SparkPost site

Closes #206
2020-09-18 15:25:25 -07:00
medmunds
d44218f733 Remove Python 2 support from packaging
(This is included in the v8.0 distribution)
2020-09-11 15:02:24 -07:00
medmunds
945e69f591 Release 8.0 2020-09-11 14:50:20 -07:00
medmunds
109f484317 Cleanup: use pathlib.Path in attach_image_file, test utils 2020-09-11 14:26:55 -07:00