Commit Graph

882 Commits

Author SHA1 Message Date
medmunds
3f63fdd713 Mailgun: Fix lost attachments with non-ASCII filenames.
Workaround requests/requests#4652 (urllib3/urllib3#303), where
uploaded files in multipart/form-data are improperly given RFC 2231
encoded filenames. That format is not accepted by Mailgun's API (and is
prohibited by RFC 7578), resulting in the attachments being silently
dropped.

Fix is to patch up the multipart/form-data before posting to remove
the RFC 2231 encoding.

Fixes #125
2018-10-10 15:02:13 -07:00
medmunds
ddafac9fbd Add DEBUG_API_REQUESTS Anymail setting to dump API communications.
Optionally dump API requests and responses to stdout, to simplify
debugging of the raw API communications. Currently implemented only
for Requests-based backends.

This (undocumented) setting can log things like API keys, so is not
appropriate for use in production.
2018-10-10 14:24:35 -07:00
medmunds
0794617750 Release 4.2 2018-09-07 11:05:20 -07:00
medmunds
9c493dba72 Postmark: Support merge_data and batch sending.
Use Postmark /email/batch or /email/batchWithTemplates APIs when
merge_data provided.

Parse Postmark batch-send API responses, and improve accuracy of
parsing individual recipient status from all responses.

Closes #122
2018-09-06 17:24:04 -07:00
medmunds
1ad406a9b5 Docs: fix typo in SendGrid 2018-09-06 17:16:16 -07:00
medmunds
753c895301 Postmark: Fix Postmark error on empty subject/body with template_id.
Postmark issues an error if Django's default empty strings are used
with template sends.

Include template send in Postmark integration tests. (Requires real
Postmark API token -- templates aren't testable with Postmark's
sandbox token.)

Fixes #121
2018-09-05 12:41:33 -07:00
medmunds
8b7b833a2b Release 4.1 2018-08-27 11:48:39 -07:00
medmunds
cb521e0e0e Python 3.8 (prep): Import Mapping etc. from collections.abc
Python 3.3 moved various collections abstract base classes from
`collections` to `collections.abc`, but also kept them available in
`collections` for compatibility with Python 2. Python 3.8 will allow
importing only from `collections.abc`.

(`collections.abc` hasn't yet been added to six.moves; see
https://github.com/benjaminp/six/issues/155.)
2018-08-27 11:24:44 -07:00
medmunds
382ebf249c SendGrid: Improve esp_extra["personalizations"] handling.
Allow merging `esp_extra["personalizations"]` dict into other
message-derived personalizations.

(See comments in #120)
2018-08-27 11:10:48 -07:00
medmunds
dbca13243f SendGrid: support new "dynamic" transactional templates
Closes #120
2018-08-24 18:21:42 -07:00
medmunds
6b99b7ef4f Docs: update readme test rendering to new PyPI layout, styles 2018-08-19 16:17:07 -07:00
medmunds
be7cc10a35 Use pipenv (Pipfile) to maintain development environment 2018-08-19 12:36:42 -07:00
medmunds
e44978daf7 Release 4.0 2018-08-19 11:53:16 -07:00
medmunds
13ffd5db40 Docs: add Rate-the-Docs 2018-08-18 17:36:10 -07:00
medmunds
5212848dc3 Amazon SES: Work around SES bug that corrupts non-ASCII message bodies.
If you are using an SES ConfigurationSet with open or click tracking
enabled, SES replaces non-ASCII characters with question marks as it
rewrites the message to add tracking, if the bodies are sent with
`Content-Transfer-Encoding: 8bit` (which is Django's default for utf8
body parts).

Force potentially problematic parts to use CTE: quoted-printable
as a workaround.

Fixes #115.
2018-08-14 17:24:49 -07:00
medmunds
b5f8e86dd4 Docs: update ESP features table with new Postmark metadata support 2018-08-14 16:22:31 -07:00
medmunds
cf42495ab1 Travis: move live tests to Django 2.1 2018-08-14 16:14:10 -07:00
medmunds
33f0f4b141 Tox: fix django111-pypy(2) and django20-py36 builds
(pypy2 is only invoked as pypy, at least in Travis env)
2018-08-14 16:14:10 -07:00
medmunds
16df17e5b8 Travis: test with released Python 3.7
The python3.7-dev environment available on Travis default trusty is
apparently an outdated beta. Released Python 3.7 is only available in
Travis on the xenial platform (and xenial is currently only available
with sudo=true).
2018-08-14 16:14:09 -07:00
medmunds
0520ee3d70 Tox: update Django 2.1 tests to allow released version only
(and don't allow failures on Django 2.1 tests)
2018-08-14 12:11:11 -07:00
medmunds
9e7814ad65 Mailgun: Support new (non-legacy) webhooks
Extend existing Mailgun tracking webhook handler to support both
original (legacy) and new (June, 2018) Mailgun webhooks.

Closes #117
2018-08-14 11:53:30 -07:00
medmunds
dacc299e5a Mailgun: Document how to use European region
Closes #116
2018-08-11 16:42:09 -07:00
medmunds
215c6a0a14 Docs: fix SparkPost Python client link
(The PyPI package is named "sparkpost". The GitHub repository is
"python-sparkpost". Sorry for any confusion.)
2018-08-11 16:13:23 -07:00
medmunds
1ac335e006 Docs: update PyPI links to point to new pypi.org
(Skip the redirect through pypi.python.org)
2018-08-11 16:11:14 -07:00
medmunds
46ff2e859c Postmark: Add metadata support
Closes #114
2018-08-11 16:00:58 -07:00
medmunds
0d389f1f93 Docs: rework troubleshooting/help page
Add guidance on how and where to get help.
2018-08-11 15:38:00 -07:00
medmunds
7d8dbdace9 Docs: update changelog links in README, PyPI 2018-07-06 16:54:29 -07:00
medmunds
9e56be1c70 Docs: don't let changelog versions overwhelm ToC's
Tables-of-contents (main and sidebar) were unmanageably long with
every release listed. Push specific versions down a level to keep
them out of ToC's.
2018-07-06 16:48:59 -07:00
medmunds
e6431a62f0 Change attach_inline_image default domain from hostname to "inline".
This avoids problems with ESPs that don't distinguish *Content-ID*
from attachment filename, where a local hostname ending in ".com" could
cause Gmail to block messages sent with inline attachments.
(Mailgun, Mailjet, Mandrill and SparkPost have APIs affected by this.)

Fixes #112.
2018-07-06 16:30:27 -07:00
medmunds
3f2c6d6917 Docs: move changelog from GitHub release notes to repository file 2018-06-15 17:10:16 -07:00
medmunds
02e6daf9d4 SendGrid: drop deprecated sendgrid_v2 EmailBackend 2018-05-30 16:02:21 -07:00
medmunds
52a6d2d822 Tests: stop using sendgrid_v2 backend for settings tests 2018-05-30 16:00:49 -07:00
medmunds
0730e96884 Travis: Revert "try to use Python 3.7 latest beta build"
Current Travis default Trusty image doesn't support latest Python 3.7.
(The outdated 3.7 alpha it has available is buggy, but is sufficient
for our tests until a Xenial image is ready.)

https://github.com/travis-ci/travis-ci/issues/9069
2018-05-30 15:58:54 -07:00
medmunds
2f20806778 Travis: try to use Python 3.7 latest beta build
(rather than Python 3.7-dev, which is stuck on 3.7.0a4+)
2018-05-30 15:31:14 -07:00
medmunds
3a47042269 Drop support for Django < 1.11 2018-05-30 15:20:47 -07:00
medmunds
23f44dce2d Begin v4.x changes 2018-05-30 15:19:20 -07:00
medmunds
b6d6db340f (PyPI doesn't allow "Django 2.1" classifier yet) 2018-05-30 14:32:38 -07:00
medmunds
f871dffbdb Release 3.0 2018-05-30 14:15:21 -07:00
medmunds
c0172063a4 SendGrid UUID message_id cleanup
* Update authors
* Update integration tests
* Add webhook message_id = smtp-id fallback test case
* Test webhooks ignore smtp-id in non-fallback cases
* Update docs
2018-05-30 13:50:35 -07:00
Josh Kersey
d8d1407c61 SendGrid: change message_id from Message-ID/smtp-id to UUID anymail_id
SendGrid does not always correctly provide the sent Message-ID header value 
to a tracking webhook's smtp-id field, making it unreliable to use for Anymail's 
`message_id`.

Instead, generate a UUID `message_id` for Anymail tracking, and pass it from 
send to webhooks in SendGrid custom args as anymail_id.

Webhooks will fall back to smtp-id for compatibility with previously-sent 
messages that didn't have an anymail_id custom arg.

Fixes #108
2018-05-30 11:52:36 -07:00
medmunds
51d2a404c0 Test/support Django 2.1 2018-05-24 11:49:35 -07:00
medmunds
f7aa67c42c Docs: add documentation privacy info
(and note that the docs site uses Google Analytics)
2018-05-24 11:04:13 -07:00
medmunds
d3ac4a1542 Drop Python 3.3-specific tests 2018-05-15 11:36:00 -07:00
medmunds
0e99bcf42e Travis/tox: drop Python 3.3; shrink Travis matrix
Discontinue support/testing for Python 3.3 with Django 1.8.
Closes #99

Focus Travis testing on currently-supported Django/Python combinations.
(But keep a few older ones in the matrix, too.)
2018-05-15 11:08:20 -07:00
medmunds
3cadaca9dd Mailjet: handle bare event when webhook "group events" not enabled
Fixes #106
2018-05-15 10:50:05 -07:00
medmunds
59a90c6895 Release 2.2 2018-04-16 15:57:10 -07:00
medmunds
dd26fd3108 Don't require boto3 if Amazon SES webhooks aren't actually used
Delay raising AnymailImproperlyInstalled from webhooks.amazon_ses
until an SES webhook view is instantiated. Allows anymail.urls
to import webhooks.amazon_ses without error.

Fixes #103
2018-04-16 15:41:00 -07:00
medmunds
e85c4a911f Fix typo in Mailgun integration test
(Was causing false failures in ~1/6 of live integration runs,
depending on what order Mailgun generated events.)
2018-04-11 12:57:49 -07:00
medmunds
d9ea741cba Release 2.1 2018-04-11 12:33:13 -07:00
medmunds
2185d25301 Add "Amazon SES" to setup.py package description 2018-04-11 11:50:45 -07:00