From 79aec15784d8a18e2004a09f66bd62749c06d8fa Mon Sep 17 00:00:00 2001 From: Mike Edmunds Date: Thu, 21 Nov 2024 18:25:09 -0800 Subject: [PATCH] Resend: no attachments with batch sending Sometime earlier today, Resend started issuing API errors when sending attachments with batch send. (Apparently the feature has never been supported, and attachments were just ignored in the batch endpoint.) Add a note to the docs, and update the Resend integration test. --- docs/esps/resend.rst | 6 ++++++ tests/test_resend_integration.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/esps/resend.rst b/docs/esps/resend.rst index 89f98e85..c9af4788 100644 --- a/docs/esps/resend.rst +++ b/docs/esps/resend.rst @@ -189,6 +189,12 @@ anyway---see :ref:`unsupported-features`. .. versionchanged:: 12.0 Resend now supports :attr:`~anymail.message.AnymailMessage.send_at`. +**No attachments with batch sending** + Resend does not currently support attachments when using + :ref:`batch sending `. Trying to send an attachment + while using :attr:`~anymail.message.AnymailMessage.merge_metadata` may + result in a Resend API error. + **No envelope sender** Resend does not support specifying the :attr:`~anymail.message.AnymailMessage.envelope_sender`. diff --git a/tests/test_resend_integration.py b/tests/test_resend_integration.py index 89f93693..be3e48e0 100644 --- a/tests/test_resend_integration.py +++ b/tests/test_resend_integration.py @@ -115,7 +115,8 @@ def test_batch_send(self): }, ) message.attach_alternative("

HTML content

", "text/html") - message.attach("attachment1.txt", "Here is some\ntext for you", "text/plain") + # Resend does not support attachments in batch send (2024-11-21) + # message.attach("attachment1.txt", "Here is some\ntext for you", "text/plain") message.send() # Resend always queues: