Commit Graph

730 Commits

Author SHA1 Message Date
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
sebashwa
4245d468ec Docs: SendinBlue templates now support attachments
Attachments now work with SendinBlue templates as long as you are using their new template language (which Anymail has required since v7).

https://developers.sendinblue.com/changelog/send-attachment-with-template-through-apiv3

Existing code works. Just remove documentation that warned of their previous limitation.
2020-02-28 10:44:11 -08:00
Mike Edmunds
0c66e1eed9 Docs: document DEBUG_API_REQUESTS setting
(And add a system check to warn about its use in production deployment.)
2019-12-15 14:23:03 -08:00
Mike Edmunds
95080bfeb9 SendGrid: document text attachment charset bug
Document SendGrid's unpredictable behavior around forcing `charset="iso-8859-1"` into text attachments. (Since it seems to be happening again.)

See #150 for details.
2019-12-13 12:49:00 -08:00
Mike Edmunds
59685b82e1 Tests: work around Mailgun event reporting change
In the live integration tests, work around Mailgun's recent change
to how inline attachments are reported in "accepted" events data.

(But keep it working either way, since it seems likely this change was
unintentional—other event types still exclude inline attachments from
`event.message.attachments`.)

Fixes #172
2019-12-11 14:53:25 -08:00
medmunds
c38218dba1 Tests: Update for Django 3.0 release 2019-12-02 10:49:12 -08:00
A Lee
1fc44a4e15 Docs: fix typos and other minor text edits
- remove extraneous parens
- a few minor suggested text edits for readability
2019-10-15 14:40:17 -07:00
Mike Edmunds
acca6a46e1 Docs: Clarify that Postmark supports merge_data
Fix outdated info in ESP summary table.

Fixes #168.
2019-10-07 12:22:17 -07:00
medmunds
2ff088df71 Tests: fix Travis pypy versioning
One more try.
2019-09-27 18:21:36 -07:00
medmunds
484dd8b505 Tests: let Travis pick the specific pypy builds 2019-09-27 13:03:30 -07:00