[Python] How to define a Content Id on an attachment using azure-communication-email?

Discussão em 'Python' iniciado por Stack, Outubro 5, 2024.

  1. Stack

    Stack Membro Participativo

    I am using the azure-communication-email library to send emails through the Azure service.

    I need to add an image in base64 format as an attachment and define a Content Id to reference it in an <img src="cid:myimagecid"> tag.

    The problem is that EmailAttachment only allows to define:

    attachment = EmailAttachment(
    name="attachment.png",
    attachment_type="png",
    content_bytes_base64=file_bytes_b64
    )


    Is there any way to define that Content Id in the attachment?

    Continue reading...

Compartilhe esta Página