Mailjet: Prevent empty attachment filename

Mailjet requires all attachments/inlines have a non-empty Filename field.
Substitute `"attachment"` for missing filenames.

Fixes #407.
This commit is contained in:
Mike Edmunds
2024-12-10 12:01:17 -08:00
parent 45848440b3
commit c7f7428b7a
5 changed files with 31 additions and 7 deletions

View File

@@ -37,6 +37,13 @@ Breaking changes
(Postal's signature verification uses the "cryptography" package, which is no
longer reliably installable with Python 3.8.)
Fixes
~~~~~
* **Mailjet:** Avoid a Mailjet API error when sending an inline image without a
filename. (Anymail now substitutes ``"attachment"`` for the missing filename.)
(Thanks to `@chickahoona`_ for reporting the issue.)
v12.0
-----
@@ -1737,6 +1744,7 @@ Features
.. _@b0d0nne11: https://github.com/b0d0nne11
.. _@calvin: https://github.com/calvin
.. _@carrerasrodrigo: https://github.com/carrerasrodrigo
.. _@chickahoona: https://github.com/chickahoona
.. _@chrisgrande: https://github.com/chrisgrande
.. _@cjsoftuk: https://github.com/cjsoftuk
.. _@costela: https://github.com/costela