Docs: SendinBlue templates now support attachments

Attachments now work with SendinBlue templates as long as you are using their new template language (which Anymail has required since v7).

https://developers.sendinblue.com/changelog/send-attachment-with-template-through-apiv3

Existing code works. Just remove documentation that warned of their previous limitation.
This commit is contained in:
sebashwa
2020-02-28 19:44:11 +01:00
committed by GitHub
parent 0c66e1eed9
commit 4245d468ec

View File

@@ -130,13 +130,6 @@ SendinBlue can handle.
Anymail has no way to communicate an attachment's desired content-type
to the SendinBlue API if the name is not set correctly.
**No attachments with templates**
If you are sending using a SendinBlue template, their API doesn't support ordinary
file attachments. Attempting to send an attachment with a template will result in the
SendinBlue API error message, "Please don't pass attachment content & templateId in same
request, instead use attachment url only."
See the :ref:`templates <sendinblue-templates>` section below.
**Single Reply-To**
SendinBlue's v3 API only supports a single Reply-To address.
@@ -226,19 +219,6 @@ If you want to use the template's sender, be sure to set ``from_email`` to ``Non
You can also override the template's subject and reply-to address (but not body)
using standard :class:`~django.core.mail.EmailMessage` attributes.
SendinBlue's template feature does not currently support providing attachment content
directly with the message---you'll get a SendinBlue API error if you try. If you must
send file attachments with SendinBlue templates, you can either upload them into
SendinBlue's template designer, or arrange to have the attachment content hosted on
a public URL and use Anymail's :attr:`~anymail.message.AnymailMessage.esp_extra`
to pass the URL to the SendinBlue API (see the Anymail SendinBlue integration tests
for an example of this). A better---and portable---option may be to avoid SendinBlue
templates and instead render the email in your Django code, allowing you to add any
file attachments you want. See :ref:`django-templates` for details.
(Note that SendinBlue doesn't support *inline* image attachments at all, whether you're
using a template or not.)
.. _new template language:
https://help.sendinblue.com/hc/en-us/articles/360000268730