Mailgun: raise unsupported feature error on attachment without filename.

Mailgun's API silently drops attachments without filenames (and inline
attachments without Content-IDs). Raise an AnymailUnsupportedFeature
error on attempts to send these attachments.

Fixes #128
This commit is contained in:
medmunds
2018-10-11 15:38:50 -07:00
parent 64f7d31d14
commit 2cf14c3653
4 changed files with 67 additions and 7 deletions

View File

@@ -45,10 +45,14 @@ Features
Fixes
~~~~~
* **Mailgun:** Raise `AnymailUnsupportedFeature` error when attempting to send an
attachment without a filename (or inline attachment without a *Content-ID*), because
Mailgun silently drops these attachments from the sent message. (See
`docs <https://anymail.readthedocs.io/en/latest/esps/mailgun/#limitations-and-quirks>`__.
Thanks `@costela`_ for identifying this undocumented Mailgun API limitation.)
* **Mailgun:** Fix problem where attachments with non-ASCII filenames would be lost.
(Works around Requests/urllib3 issue encoding multipart/form-data filenames in a way
that isn't RFC 7578 compliant. Thanks to `@decibyte`_ for catching the problem and
`@costela`_ for identifying the related Mailgun API oddity.)
that isn't RFC 7578 compliant. Thanks to `@decibyte`_ for catching the problem.)
v4.2