Create email message text from a template

Create email message text from a template

The advanced email tool workflow component, Create email message text from a template is able to convert an email template into an html payload, where all variables has been substituted. This can e.g. be used, if you want to verify the contents of an email without sending any email.

 

The component has this parameter:


  1. Mail template
    The mail template file (.vm) (UTF-8 encoded), that setup the layout of the contents of the email. It can be selected either as a fixed file or dynamic via an XPath expression. In this file you can use variables setup in the workflow. Variables are referred to with a preceding $-sign.

Generates the HTML document for an e-mail body, based on an Apache Velocity template. The template must be uploaded in the "Mail templates" folder in the library.

In the Velocity template, you can use variables that will be replaced with metadata values (technically Camel header values). The "Set workflow variable" component can be used to set the values for the variables that are used in the mail template.


Note that Velocity variables must start with an alphabetic character (a .. z or A .. Z). The rest of the characters are limited to the following types of characters:

Alphabetic (a .. z, A .. Z)
Numeric (0 .. 9)
Hyphen ("-")
Underscore ("_")

For additional details of the Velocity format, see https://velocity.apache.org/engine/1.7/user-guide.html

    • Related Articles

    • Advanced Email tool workflow components

      The advanced Email tool workflow components are these: 1.Create email message text from a template. With this component you can convert a mail template into html while also substituting any variables found. 2.Payload to attachment. With this ...
    • Advanced Create document workflow components

      The list of advanced create document workflow components is here: Append a PDF. This appends (adds) an extra PDF file to the PDF file in the payload. This require the Advanced PDF module. Create EML with PDF. This creates an email in the payload for ...
    • To email EML message

      The advanced, create document workflow component, To email EML message creates a payload of the type .eml. The email properties has to be setup prior to this component. That can e.g. be done with the component, Email details. The To email EML message ...
    • Create an html template

      The InterFormNG2 designer is able to create two kinds of templates: 1.Normal templates. They are used when you want to design a form for printing or PDF output. The manual mainly covers these templates. 2.HTML templates. These templates can be used, ...
    • Create PDF email

      This workflow component merges the input file with a template and sends out an email with an attachment PDF file, which is result of the merge between the input file and the template. The output payload is the same as the input payload e.g. XML. ...