Well the XML file produced by the Secure Email Input task contains all the information you need: From/To, location of the Body file, location of all the attachment files, etc.
So in Workflow, you could move those files to a specific location, and then call the Data Mapper with the XML file. After that, you call a Print template where scripts can dynamically load the files.
Obviously, if your attachments are of mixed type (bitmaps, PDFs, text, etc), you’ll have to go through a little bit of gymnastics to figure out how to load and display them in your template.
There are numerous ways of achieving this. Here are a few examples:
Create a script that contains something like this. Set its selector to whichever element in your template you want to replace with the contents of the dynamically loaded file:
var emailBody = loadhtml("C:/emails/body.html");
results.html(emailBody);
If the file is text file, you’d use loadText(). If the file is an image, you’d use a script to change the SRC attribute of an IMG element in your template so that it points to the file that you want to load.
It works when im checking the XML out with the datamapper and the template. The template shows the body and other attachments, but it won’t do the same in the workflow proces.
Input inbox Secure email
2 Branch to split the xml and take out the files i want .html .gif . jpg .pdf etc.
When there is nothing more to split the XML goes down into the branch to Execute the datamapper and execute the template and @ the end set this to an PDF file.
The XML passed the DataMapper en the Template but the output is the same XML as the input from the Input Inbox Secure Email.