Commit Graph

267 Commits

Author SHA1 Message Date
sblondon
8a72f89e8a Sendinblue: rename to Brevo
* Update docs to (usually) refer to Brevo rather than Sendinblue
* Change SENDINBLUE_API_URL to api.brevo.com
   (same API is available on both domains)
* Leave code references (settings, backend name, webhook urls)
   unchanged as `sendinblue`, to avoid unnecessary client changes
2023-06-13 13:04:52 -07:00
Mike Edmunds
744d467f70 Postmark inbound: improve inbound parsing
- Support Postmark's RawEmail option;
  recommend it in docs
- Handle Bcc when provided by Postmark
- Obtain `envelope_sender` from Return-Path info
  Postmark now adds, rather than parsing Received-SPF

Related:
- Add `AnymailInboundMessage.bcc` convenience prop
- Test against full Postmark "check" inbound payloads
  (which don't match their docs or real inbound payloads)
- Don't warn about receiving "check" payload
2023-05-06 11:40:00 -07:00
Mike Edmunds
746cf0e24e Mandrill: drop Djrill compatibility 2023-05-04 13:08:05 -07:00
Mike Edmunds
41754d9813 Amazon SES: use SES v2 API by default
- Rename `anymail.backends.amazon_sesv2.EmailBackend`
  to `amazon_ses`, making SES v2 the default.
- Rename the old `amazon_ses` backend to `amazon_sesv1`,
  keeping it available. Add a deprecation warning.
- Alias `amazon_sesv2` to `amazon_ses`, with a
  deprecation warning (for projects that opted
  into v2 early under Anymail 9.1 or 9.2).
- Similar renaming on the test files.
- Update docs to assume v2 in most places
  (other than migration-specific sections)
2023-05-04 12:27:55 -07:00
Mike Edmunds
e8df0ec8e0 Modernize packaging
Switch to pyproject.toml packaging, using hatchling.

- Replace all uses of setup.py with updated equivalent
- BREAKING: Change extra name `amazon_ses` to
  `amazon-ses`, to comply with Python packaging
  name normalization
- Use hatch custom build hook to freeze version number
  in readme (previously custom setup.py code)
- Move separate requirements for dev, docs, tests
  into their own requirements.txt files
- Fix AnymailImproperlyInstalled to correctly refer
  to package extra name
- Update testing documentation
- Update docs readme rendering to match PyPI
  (and avoid setup.py)
- In tox tests, use isolated builds and update pip
- Remove AUTHORS.txt (it just referred to GitHub)
2023-05-03 16:55:08 -07:00
Mike Edmunds
62bd0669af MailerSend: add support (new ESP for Anymail)
Closes #298
2023-03-10 17:22:20 -08:00
Mike Edmunds
ea446a94d3 Amazon SES: implement SES v2 API backend
* Add `anymail.backends.amazon_sesv2.EmailBackend` using SES v2 API
* Declare current SES v1 backend as "deprecated"

Closes #274
2023-02-26 14:16:46 -08:00
medmunds
f5f3fc86e6 Simplify url patterns
Favor `django.urls.path` over `re_path` where possible.
2023-02-08 14:23:15 -08:00
medmunds
353e793323 Docs: update absolute links to anymail.dev
Canonical hosting for docs moved from anymail.readthedocs.io
to anymail.dev in May 2022.
2023-02-08 11:25:11 -08:00
medmunds
b4e22c63b3 Reformat code with automated tools
Apply standardized code style
2023-02-06 15:05:24 -08:00
medmunds
40891fcb4a Apply code styles via pre-commit
- Add black and isort for Python styling
- Add doc8 for reStructuredText styling
- Add prettier for css/html/js/md/yaml styling
- Run all styling tools from pre-commit hooks
- Adjust flake8 config for compatibility with black
  (and current Django style)
- Add some other helpful pre-commit hooks
- Update editorconfig to match Django
  (with a few necessary adjustments for Anymail)
- Update `tox -e lint` to run all pre-commit hooks
- Update contributing docs
2023-02-06 15:05:24 -08:00
medmunds
b86613cf15 Docs: add source repo link to main ToC
(Based on feedback from docs site.)
2022-12-18 16:20:24 -08:00
medmunds
287c2175f4 Sendinblue: Support send_at
Add support for delayed sending via
Sendinblue's public beta "scheduledAt"
parameter.

Closes #280
2022-12-18 15:53:45 -08:00
Jelte Fennema
a8cfb2e5eb Fix link to mailjet apikeys
The old link returns a 404 now
2022-12-18 12:22:43 -08:00
Tim Schilling
a4f50c4340 Confirm support for Django 4.1
Replaces deprecated `django.utils.timezone.utc` with
`datetime.timezone.utc` (available since Python 3.2).
2022-08-24 13:24:27 -07:00
David Gilman
e3cd4df1fc Allow requests session customization, document use for automatic retries
* Refactor create_session() out of AnymailRequestsBackend
* Document automatic retries with Requests
2022-06-26 18:52:46 -07:00
medmunds
a67a40957a Docs: update 'requests' intersphinx url
The python-requests docs ["official" location has changed][0]
to requests.readthedocs.io. (And the old domain is no longer live.)

[0]: https://github.com/psf/requests/issues/6140#issuecomment-1135071992
2022-05-28 09:40:20 -07:00
medmunds
ad08892eb0 Release 8.6 2022-05-15 10:11:00 -07:00
medmunds
09f21a5c2d Mailgun/SendGrid inbound: workaround Django filename issue
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
2022-05-13 10:19:12 -07:00
medmunds
6a2e30ba8f Docs: note Mailgun broken display name encoding
Document that Mailgun's API can mis-encode
display names containing both punctuation and
non-ASCII characters.

Closes #270
2022-05-03 15:27:05 -07:00
medmunds
33af7c387d Docs: note Mandrill broken attachment filenames 2022-05-03 13:20:31 -07:00
medmunds
d22f03c751 Docs: update Mandrill info
* Update "limited support" note to reflect
  availability of Mandrill trial account
* Update links to Mandrill docs
2022-05-03 13:18:32 -07:00
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
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
Tilmann Becker
e90c10b546 Add Postal support
Thanks to @tiltec for researching, implementing, testing and documenting it.
2021-06-07 17:11:35 -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
medmunds
7ff647c303 Docs: show Postmark MessageStream example 2021-02-24 12:30:05 -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
2196ab8330 Docs: update Mailgun links and examples 2021-01-27 14:37:16 -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
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
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
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
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
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
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