REST API - Archive email using POST /Emails - how to import the images embedded inside the Body of message?

Archived

Arguments

I'm triyng to archive emails to SugarCRM using Rest API /Emails POST Method.

With argument "description_html" I can import the HTML Content of the body of original message.

In case of embedded images I tried to use the encoded Base64 format using <img src > HTML tag

example:

<img src="data:image/gif;base64,R0lGR0lGR0lGeBBB..." />

but seems doesn't work, the image is not visibile

If I use <img src > with external url link it works:
<img src="">www.besttool.it7logo.png" alt="Logo" />

but in this case I have to post all images as upload attachment (usig POST Notes/temp/file/filename) and link it?

Thank in advance,

best regards,
Vincenzo


   

Parents Reply
  • Hello Andre, thank you

    I'm trying to follow your advice:

    I guess I should upload all embedded images (using /EmbeddedFiles/:record/file/:field PUT POST) before, so I can set the "description_html" with the URI of embedded images

    but is not possibile to run EmbeddedFiles because I don't have the record ID of message,  I get recordID of message only in the response content /Emails POST



    I tried to POST Emails before EmbeddedFiles (So I have have record ID), and tried after to update "description_html" using post /Emails PUT but is not possible in case of archived email

    "error_message""Not allowed to edit field description_html in module: Emails"

    kind regards,

    Vincenzo

Children
No Data