Commit Graph

873 Commits

Author SHA1 Message Date
Mike Edmunds
d6c108c027 Tests: test with Django 5.1 prerelease 2024-05-22 11:16:01 -07:00
Rodrigo Nicolas Carreras
33f680686b Add merge_headers option for Amazon SES
Add new `merge_headers` message option 
for per-recipient headers with template sends. 

* Support in base backend
* Implement in Amazon SES backend
  (Requires boto3 >= 1.34.98.)

---------

Co-authored-by: Mike Edmunds <medmunds@gmail.com>
2024-05-21 11:55:29 -07:00
Mike Edmunds
4c62f7bee0 Tests: fix broken inbound test
Django SafeMIMEText corner case
behaves differently in Python
3.11.9+, 3.12.3+, likely due to
https://github.com/python/cpython/pull/116125
2024-05-16 11:39:48 -07:00
Mike Edmunds
daef82c158 Amazon SES: improve missing client error 2024-05-16 11:37:19 -07:00
Mike Edmunds
25980d8a74 Upgrade flake8
Bump flake8 version to avoid
checking punctuation inside
strings under Python 3.12.
2024-05-16 11:36:57 -07:00
Dustin Wyatt
dc1ddfa739 Docs: Fix inbound headers example
Inbound example incorrectly used `EmailMessage.getall`; should be `get_all`.  https://docs.python.org/3.12/library/email.message.html#email.message.EmailMessage.get_all
2024-04-18 11:19:07 -07:00
Patrick Hintermayer
bf257ec3f2 docs(brevo): fix minor typo 2024-03-13 11:05:55 -07:00
Mike Edmunds
24b65e0f74 CI/CD: upgrade workflow dependencies 2024-03-12 13:52:57 -07:00
Mike Edmunds
abb984485b Amazon SES: remove deprecated v1 support
- Remove deprecated amazon_sesv1 EmailBackend
- Remove deprecated amazon_sesv2 alias
  for amazon_ses EmailBackend
- Update docs
2024-03-12 13:38:45 -07:00
Mike Edmunds
1b78912b20 CD: fix release workflow permissions
(Note: v10.3 *was* released successfully,
but the workflow failed to update
the GitHub Releases page at the end
due to token permission problems.)
2024-03-12 12:22:43 -07:00
Mike Edmunds
fc1bd1497f Release 10.3 2024-03-12 11:46:20 -07:00
Mike Edmunds
948ab2be27 Brevo: SendinBlue compatibility
(See previous commit.)

- Maintain deprecated compatibility
  versions on the old names/URLs.
  (Split into separate commit
  to make renamed files more
  obvious.)
2024-03-11 18:51:39 -07:00
Mike Edmunds
c7ee59c3ca Brevo: Rename SendinBlue to Brevo
- Replace "SendinBlue" with "Brevo"
  throughout the code.
- Maintain deprecated compatibility
  versions on the old names/URLs.
  (Split into separate commit
  to make renamed files more
  obvious.)
- Update docs to reflect change,
  provide migration advice.
- Update integration workflow.
2024-03-11 18:46:52 -07:00
Mike Edmunds
14d451659e Unisender Go: fix integration test
test+bcc2@... is a sink address;
bcc2@... is not (and gets rejected)
2024-03-06 17:10:36 -08:00
Mike Edmunds
e758579230 Docs: fix list spacing
Workaround sphinx-rtd-theme regression
on spacing in "open" lists.
2024-03-06 16:10:37 -08:00
David Jean Louis
5949069321 Mailgun: fix webhook error with null delivery-status
Mailgun now sometimes posts `"delivery-status": null` 
in the tracking event payload. Avoid raising an AttributeError
when that occurs.

Fixes #361
2024-03-05 13:58:41 -08:00
Arondit
a71a0d9af8 Unisender Go: new ESP
Add support for Unisender Go

---------

Co-authored-by: Mike Edmunds <medmunds@gmail.com>
2024-03-05 11:38:40 -08:00
Mike Edmunds
a2c0ed6817 Docs: fix broken links in search results
Upgrade to sphinx-rtd-theme 2.0.x
to fix broken links in search results
(for searches rendered client side).

See https://github.com/sphinx-doc/sphinx/issues/11608#issuecomment-1684410476
and https://github.com/readthedocs/sphinx_rtd_theme/pull/1507
2024-02-29 15:09:06 -08:00
Mike Edmunds
706fce60ac Resend: support batch send
Add support for `merge_metadata`
and new Resend email/batch API.
2024-02-19 16:41:22 -08:00
Mike Edmunds
d2c56285c0 Docs: update Brevo feature matrix 2024-02-19 15:00:43 -08:00
Mike Edmunds
53546ffc19 Docs: simplify editing ESP feature matrix
Move the big ESP feature matrix table
into a CSV file for easier maintenance.

Remove the doc8 line-length exception
the old table needed.

Docutils csv-table directive doesn't
support colspan on the subheadings
like the old table did. Add some JS
that replicates the old behavior.
(The new table is still readable even
with JS disabled.)
2024-02-19 15:00:43 -08:00
Mike Edmunds
4f305131ee Brevo: add batch send support
Closes #353
2024-02-19 11:52:10 -08:00
Mike Edmunds
804cb76aa1 Docs: Update Brevo opened event
Brevo has stopped sending the opened
event on first open (along with the
unique_opened event), so change docs
to recommend enabling both.
2023-12-29 11:28:40 -08:00
Mike Edmunds
2cadb949cd Resend: disable bad-auth integration test
Resend's API no longer returns 403
responses for bad API keys (or 401
for missing auth header). Now, it just
never responds, leading to a TimeoutError.

Since this seems likely to be a Resend
bug, just disable the bad API key
integration test for now.

(Resend changed behavior sometime between
2023-12-07 and 2023-12-14, from our
scheduled integration test runs.)
2023-12-29 11:28:40 -08:00
Mike Edmunds
63e355084c CI/CD: Django 5.0 release
(Had already been testing against 5.0
pre-release builds.)
2023-12-04 13:33:34 -08:00
Mike Edmunds
3a89bb9b38 Packaging: fix status badges in frozen readme
GitHub status badge urls no longer allow
branch=TAG. Must use branch=BRANCH or
tag=TAG. (This was only visible in
published description on PyPI.)

(Actions job filter still requires branch=TAG_OR_BRANCH)
2023-12-04 11:33:44 -08:00
Mike Edmunds
c147754c4c CI/CD: Fix release to GitHub
GitHub runner images dropped the "hub"
tool. Replace with "gh" cli, which now
supports editing releases.
2023-10-25 16:32:42 -07:00
Mike Edmunds
e15b3ce1ec Release 10.2 2023-10-25 13:01:30 -07:00
Mike Edmunds
29d9a49d6e Update PyPI trove classifiers
- Add Django 4.2, 5.0
- Add Python 3.12
2023-10-25 12:50:32 -07:00
Mike Edmunds
0b96612143 Docs: note alternative for Postmark 2023-10-25 12:47:17 -07:00
Mike Edmunds
88eccc67df Docs: fix bad MailerSend webhook examples 2023-10-25 12:36:40 -07:00
Mike Edmunds
b5ef492466 Resend: new ESP (#341)
Add support for Resend.com backend and webhooks.

Closes #341
2023-10-25 12:23:57 -07:00
Mike Edmunds
823a161927 Fix global SEND_DEFAULTS merging
Replace generic `combine` with
specific `merge_dicts_deep`,
`merge_dicts_shallow`,
`merge_dicts_one_level` or
`concat_lists`, depending on
appropriate behavior for each
message attribute.

Fixes merging global `SEND_DEFAULTS`
with message `esp_extra` for ESP APIs
that use nested payload structures.
And clarifies intent for other properties.
2023-10-19 14:33:50 -07:00
Mike Edmunds
f911ee78a0 Fix Python 3.12 deprecation warning 2023-09-22 11:08:20 -07:00
Mike Edmunds
97fe8162bf Test: enable Django 5.0alpha and Python 3.12rc 2023-09-22 11:08:20 -07:00
Mike Edmunds
42dbfcf2c4 Docs: fix RTD Sphinx build, update deps 2023-08-25 12:35:08 -07:00
Mike Edmunds
6c5b6b76fc Mailgun (docs): Clarify API keys
Explain account-level "Mailgun API keys"
vs. domain-level "sending API keys."
2023-08-24 17:44:33 -07:00
Mike Edmunds
de44b938e9 Release 10.1 2023-07-31 10:45:38 -07:00
Mike Edmunds
05afde0651 SendGrid: support multiple reply_to
Closes #325
2023-07-27 18:37:31 -07:00
Mike Edmunds
c8a5e13c89 Brevo: add inbound support
(Also adds "responses" to test requirements,
for mocking fetches of Brevo inbound
attachments.)

Closes #322
2023-07-27 18:26:57 -07:00
Léo Martinez
0ac248254e Inbound: improve inline content handling
* refactor: derive `AnymailInboundMessage` from `email.message.EmailMessage`
  rather than legacy Python 2.7 `email.message.Message`

* feat(inbound): replace confusing `inline_attachments` with `content_id_map`
  and `inlines`; rename `is_inline_attachment` to `is_inline`; deprecate old names 

Closes #328

---------

Co-authored-by: Mike Edmunds <medmunds@gmail.com>
2023-07-27 15:10:58 -07:00
Mike Edmunds
bc8ef9af0f Tests: update Postmark integration
Postmark has changed their error message
for invalid server token. (Also, we don't
care about the specific error code, just
that the error is caught and reported.)
2023-06-27 12:25:13 -07:00
Mike Edmunds
4f4461af4d Tests: update Mandrill integration
Mandrill has changed status code for
invalid from_email from 500 to 400.
(We don't actually care about the specific
code, just that the error is caught and
reported.)
2023-06-27 12:23:35 -07:00
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
099ef314e4 Release 10.0 2023-05-07 12:09:28 -07:00
Mike Edmunds
a3ad0254cf CI: Simplify test PyPI release
Allow releasing to Test PyPI by setting GitHub
environment "release" variable `PYPI_REPOSITORY_URL`
to `https://test.pypi.org/legacy/`.

Also ensure twine-upload doesn't try to prompt
for credentials, and turn off upload progress bar.
2023-05-07 11:41:24 -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
2335b9cfc8 Fix ReadTheDocs build
- Docs build now requires package installed
- Update tox docs to use Python 3.11, same as RTD
2023-05-03 17:21:41 -07:00