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

Viewed 55

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?

0 Answers
Related