Commit Graph

889 Commits

Author SHA1 Message Date
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
medmunds
088d3c8eb9 Cleanup: add reprs for AnymailStatus, AnymailRecipientStatus 2020-09-11 14:26:55 -07:00
medmunds
03dd15d485 Cleanup: add reprs for Attachment, EmailAddress 2020-09-11 14:26:55 -07:00
medmunds
feee8b5c5a Cleanup: simplify requests backend raise_for_status
Treat all 2xx (not just 200) as success in base
AnymailRequestsBackend.raise_for_status, eliminating
some unnecessary subclass overrides.
2020-09-11 14:26:55 -07:00
medmunds
a14276e765 Cleanup: remove unused MailjetPayload property 2020-09-11 14:26:55 -07:00
medmunds
985143b234 SparkPost: add subaccount support 2020-09-11 11:10:24 -07:00
medmunds
61660cd5ff SparkPost: call HTTP API directly [breaking]
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
2020-09-11 11:10:24 -07:00
medmunds
470ed2c6e6 Test utils: add assertDictMatches 2020-09-11 11:10:24 -07:00
medmunds
be7f2516b0 Add Attachment.content_type 2020-09-11 11:10:24 -07:00
medmunds
5b04ae30f2 Ensure EmailAddress can't contain newlines 2020-09-11 11:10:24 -07:00
Mike Edmunds
bc1156149a Mailjet: Upgrade to Send API v3.1 [breaking]
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
2020-09-08 14:50:26 -07:00
Mike Edmunds
cca653fcba Docs: update tooling and outdated/broken content
* Update docs build config
  * Specify Sphinx and theme versions in docs/requirements.txt
    (tox had been using latest; RTD had pinned older versions)
  * Update docs builds for Python 3 and recent Sphinx
  * Remove obsolete sphinx-rtd-theme patches
  * Add .readthedocs.yml
  * Move some JS to async (now that Sphinx supports that)
  * Fix version-alert.js for async loading
* Remove docs versionadded/changed info older than v3.0
* Fix broken GitHub issue links in changelog (never worked?)
* Add setup long_description_content_type
* Drop poorly maintained AUTHORS.txt 
  (just point to GitHub contributors page)
2020-09-07 12:05:39 -07:00
mike w
963b8b4b50 docs: fix documentation for anymail_test_params 2020-09-05 10:22:37 -07:00
medmunds
7d726734eb Rename git default branch to "main" 2020-08-14 17:58:06 -07:00
medmunds
9095974d4a Travis: run on vX.Y.x branches, too
E.g., "v7.2.x"

(Cherry picked from v7.2.x branch)

[ci skip]
2020-08-05 12:55:16 -07:00
medmunds
48a9aaebf4 (Cherry pick v7.2.1) 2020-08-05 12:51:58 -07:00
Mike Edmunds
85cec5e9dc 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)
2020-08-01 14:53:10 -07:00
medmunds
c803108481 SparkPost: reduce live integration test volume
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.
2020-07-29 14:41:35 -07:00
medmunds
b9cba8243d Docs: Amazon SES webhooks: warn about SNS console bug
Add a warning about a bug in the AWS SNS console that
converts part of the webhook secret to asterisks.

Closes #194
2020-07-29 14:32:22 -07:00
medmunds
bb20ebf0e9 Docs: clarify behavior of Anymail's added send options 2020-07-29 14:25:25 -07:00
medmunds
1dbb92cfb1 Release 7.2 2020-07-25 11:46:19 -07:00
Mike Edmunds
743d3ce21f SendGrid: fix inbound webhook Unicode error when not utf-8
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
2020-07-24 17:32:45 -07:00
medmunds
c4ed6660b3 Mailjet: fix TypeError in sanitize_address
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.
2020-07-23 13:19:17 -07:00
medmunds
448d5ec8e5 Update Django and Python build versions
* 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
2020-07-23 13:19:17 -07:00
medmunds
a68938bdc6 Docs: add shell quoting to install commands
In docs install examples, show double quotes around
package specifiers that include square brackets, to
prevent them from being interpreted as shell globs.
(Helps with installation on Windows and zsh, e.g.)

Closes #188
2020-07-22 13:43:07 -07:00
medmunds
35792354b3 Amazon SES: fix bcc
Set SendRawEmail Destinations param to pick up all
recipients, including bcc (which doesn't appear in
message headers).

Fixes #189
2020-07-22 13:42:48 -07:00
medmunds
c974c1ec67 Adjust to flake8's new opinions on import order 2020-07-22 13:42:48 -07:00
Dmitry Groshev
6792ed8658 Avoid Django3.0 force_text deprecation warning
Switch to force_str, falling back to deprecated 
force_text for Python 2 compatibility.
2020-06-06 11:19:59 -07:00
medmunds
7b3305d0b9 Release 7.1 2020-04-13 14:46:19 -07:00
medmunds
7a16b9e51f Docs: Update capitalization of "Sendinblue"
Sendinblue dropped the inner-cap ("SendinBlue")
from their brand sometime between September 2018
and March 2019. Update Anymail's docs to consistently
use the new spelling.

(But don't change any code, which has existing
string constants using the old spelling.)
2020-04-13 14:32:54 -07:00
jc-ee
2a36da54e6 Postmark: Fix sending templated email to a single recipient
Fix a bug where sending an email with a template_id and a single to address
would cause a Postmark API error.

Thanks @jc-ee for finding and fixing.
2020-04-13 13:48:37 -07:00
Mike Edmunds
920d8dd70f SendGrid: Fix multiple recipients with only merge_global_data
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
2020-03-18 17:08:10 -04:00