Email body

Email body

This section describes the options you have for setting up the body section of emails, that you send out with InterFormNG2.

The body section of an email can be any of these:
1. An HTML template, that has been created in the InterFormNG2 designer
One user friendly way to setup the body section of an email is to create an HTML template with the InterFormNG2 designer and then refer to that as the email template, when you create the email later. Such template are very advanced and you can even build up a complete document with detail lines in such an HTML template. These templates are saved to the Templates library and have the extension .ifm.

The email HTML templates of InterFormNG2 can be quite advanced with variables, repeat loops and conditions.

You refer to the html template here in the email setup:

This shows a drop down list of all email templates.




2. An HTML or VM template, that has been loaded into the mail templates library
The alternative to email templates, that are created in the InterFormNG2 designer are html and vm (Apache Velocity) files, that has been loaded into the mail templates library of InterFormNG2. Vm templates can be used for quite advanced layouts (including support for variables), but the HTML templates created with the InterFormNG2 designer are normally more user friendly to work with.


3. An input html or text file
If you have a payload of the workflow which is either a text file or html then you can directly use that as the body of the outgoing email. 

Here is a workflow, which waits for a text file in a folder. When a text file is found an email is generated where the contents of the email is simply the contents of the incoming text file:


First the email details are setup:

- and then the email is sent via to email server:



You can setup a workflow in a similar way to handle an input HTML file in the same manner.
4. Select the email template dynamically via an Xpath expression
Instead of selecting a fixed mail template in your email setup you can also choose to setup an Xpath expression to dynamically select the email template to use for a specific input file.

You do that in the email setup by clicking this icon to the right of the mail server:


Then the mail template can be selected via an Xpath expression e.g. via a variable:




 
    • Related Articles

    • Email output

      This section contains information about emailing from (and to) InterFormNG2. For the most email scenarios you would need to setup an email server and then use either of the workflow components, Create PDF email (if you want a standard PDF attachment) ...
    • Email notifications

      InterFormNG2 can send out email notifications. On the system level you can setup a global email server and when that is setup you can choose these email notifications: Health emails Health emails That is also setup on the global email settings. If ...
    • Read from email server

      The workflow input type, Read from email server can be used, if you want InterFormNG2 to read incoming emails from a mail server and then process these emails. You can select this input type, when you create a new workflow: The parameters of this ...
    • Send an HTML email

      You can send an HTML email without an attachment with the shortcut Output workflow component: Send an HTML email. If you want an attachment, then you should consider the Create PDF email component instead. The Send an HTML email workflow component ...
    • 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. This ...