OL Learn

Secure Email Input

In Pres Connect Workflow im using the Secure Email Input Plugin. Via this plugin im capturing the e-mail (Attachments,Body ect).

Im searching for an option to export the total mailformat to PDF. So the from/ to field + Body + attchments in one PDF format. Is this possible?

The problem is i want to conver the Body via PresConnect to XML or PDF instead of HTML.
I hope someone could help me.

Regards

Tim Willemse

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.

Hi Phil,

Thank you for your reply. Is it possible to give me an example how to dynamically load the files?

Regards

Tim

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.