use vco resource as mail attachment

Hello I want to store all my orchestrator procedures in the resource store of VCO

and when I send a request to a team by mail I send the doc (pdf) attached in the mail

in the resource, the element  file is recognised as "mime type" = application/pdf

I have modified the "sent mail" workflow adding those lines 

var fileAttachment = new MimeAttachment();

if(mimeRessource){//mimeRessource is the resource element

fileAttachment.name = mimeRessource.name;

fileAttachment.content = mimeRessource.getContentAsMimeAttachment();

message.addMimePart(fileAttachment,"text/html; charset=UTF-8");

but the file cannot be read by the user who open the mail

the error in adobe reader is "the file is not recognized as a pdf"

sure I am missing something

0 Kudos
1 Reply

pb solved

all lines are not necessary

I only have to add the pdf resource element to the message.addMimePart

aide is the ressource element


0 Kudos