Hello Experts,
I am facing issue with embedded image in mailbody for Sender mail adapter scenario. I have Mail to webservice scenario. Receiver KM Webservice has createdocument operation to generate file at repository.
When there is a mail with only embedded image then PI treat image as an attachment and mailbody looks good. In the place of embedded image I see red cross mark. So I call webserivce twice to generate .jpg file and emailbody as HTML files at target end. It looks fine.
But when there is a Mail with embedded image in it and also an attachment e.g pdf file then system consider pdf file as an attachment and embedded image is considered as a part of email body. But at target end, mailbody file is generated with body text + Base64 code for the embedded image at the bottom of file.
One way is to extract the base64 code from the source field ("Content"), But I am facing difficulty in tracing number of embedded images in the source Content field as source field will have HTML code + Base 64 code for multiple images.
I also referred blog for Michal Krawczyk for PayloadSwapBean but it generates only XML as an attachment, I am not sure of it can handle mailbody as HTML + image in it.
Sender mail adaptor channel is configured with encoding as "None"/"base64", but no use. it results in mailbody with Base64 code at bottom of HTML file.
Kindly suggest me how can I get complete mailbody and image as a file at target end? Please suggest if there is any possible workaround.
Thanks in advance.
Vinit.