The E-Mail Send/Receive application allows to send and receive e-mails.
Figure: Properties - Email Application
To set a password which is used to store the randomly generated Mail Application key, add the following property
to your server-side carnot.properties file:
Security.Keystore.MailApplication.KeySecret = <password>
Note that if this property is not set, an exception "Missing Keystore Password for Mail Application Secret" will be thrown accordingly.
To decide if mails, which have been sent using the legacy hash code validation before this change, will still be
accepted, a property Security.Mail.AllowLegacyValidation has been introduced. Per default this
property is set to false, which means that only JWT validation is accepted. If set to true,
the legacy hash code validation as well as JWT validation are accepted.
Apart from the common properties, the following property tabs are provided for an E-Mail Send/Receive application:
Predefined IN access points are created for to, from, cc, bcc and subject. You cannot create OUT access points. If IN data mappings are defined on predefined IN access points for meta-information, then at runtime available value overwrites the value defined in the UI. However, the OUT access point returnValue (String primitive) is created as soon as a response type is selected.
Figure: Parameter Mapping
Figure: Primitive Data
Figure: Structured Data
Figure: Document Data
Note: It is recommended to use small documents, because big files may cause memory issue and could be rejected by email server.
The default and added parameters can be set as input access points in data flow to the E-Mail application.
Figure: Mail Application access points
The http response type is supported which allows correlating back process data information via MailReceptionServlet. The http response type requires a server base URL. For example, http://myippruntime/mycontextroot. The E-Mail Overlay is implemented as asynchronous Camel application type if a response type is selected.
Figure: Response
The http response type requires an Enumeration type (SDT of type Enumeration) where each element in the Enumeration becomes a link in the email (e.g. Approved, Rejected, etc).
Figure: Response
You can use configuration variables for user and password.
The e-mail editor is provided to format and write email contents. You can format an email using the following icons:
| Icon | Function | Description |
|---|---|---|
![]() |
Source | Displays source of the content |
![]() |
Cut | Using this icon you can move the content. It is enabled when some text is selected in the editor. |
![]() |
Copy | Using this icon you can copy the cut or selected content in the editor. It is enabled when some text is selected. |
![]() |
Paste | Using this icon you can paste the copied or cut content in the editor. |
![]() |
Paste as Plain Text | Using this icon you can paste the copied content as plain text. |
![]() |
Paste from Word | Using this icon you can paste the copied content from Microsoft Word. |
![]() |
Undo/Redo | Using this icon you can undo or redo the most recent action taken. |
![]() |
Spell-check | Enables you to check the spellings in the content. |
![]() |
Bold, Italic, Strike Through, Remove Format | Applies bold, italic, strike through formatting or removal of formatting to selected text. |
![]() |
Insert/Remove Numbered List | Inserts or removes numbered list |
![]() |
Insert/Remove Bulleted List | Inserts or removes bulleted list |
![]() |
Increase or Decrease Indent | Increases or decreases the text indentation. |
![]() |
Block Quote | Format a block of text to identify quotations. |
![]() |
Link, Unlink and Anchor | Adds link to the selected text or unlink the linked text or provide anchor for the text. |
![]() |
Image | Inserts an image at specified location. |
![]() |
Table | Inserts a table at specified location. |
![]() |
Horizontal Line | Inserts horizontal line at specified location. |
![]() |
Special Character | Inserts special characters at specified location. |
![]() |
Styles | Enables you to specify styles for the content. |
![]() |
Format Paragraph | Enables you to format paragraph of the content. |
![]() |
Maximize | Increases the size of the editor. |
![]() |
About CKEditor | Displays information about editor. |
You can test the application in this tab. Click Reset to initialize the input data and then click Run.
Figure: Resulting Test email
You can view the email content to be sent. If you have provided response type as HTTP then the data values provided in the enumeration type are displayed as links.
Figure: Test email with options to select
You can add customized templates for attachments. The templates source could be:
For the embedded attachments, the details below should be defined.
Root/artifacts/templates. (example of relative paths to sub
folders : reports/AdminReport.docx,
the template will be looked up at Root/attachments/templates/reports/AdminReport.docx)./attachments/templates/ClientDetails.docx,
the template will be looked up at Root/attachments/templates/ClientDetails.docx).ipp-portal/WEB-INF/classes.
Figure: Attachment templates configuration

Figure: Document repository
More details about template creation are described here.
In many situations, the end user would like to specify the attachments and templates dynamically at runtime.
The following model shows how to do that. It has a manual activity where details for structured data Person and TemplateConfiguration are entered. In the second activity, an email application is invoked using the entered data.
Figure: Dynamic email attachments model
Below the main steps to create the model.
Figure: TemplateConfiguration structured data
The SDT is a list of attachments with the attributes below:
Figure: Dynamic Template Attachments
Figure: Template configuration access point

Figure: Enter a parameter for Person

Figure: Select input access point

Figure: Select input access point for Person
Dear Mr. {{Person.Firstname}} {{Person.Lastname}}!

Figure: Code entered for Email content
Deploy the model and start the created process. Proceed as follows:
Figure: Email sample with dynamic attachment
Note
If the T Template check box is not selected, the file will not be attached to the email!
The attachment tab allows to define documents to be attached to the e-mail sent. Those documents have usually being processed by a template engine where the template is located in the document repository or class path and the actual values are derived from process data. This example explains how attachment documents could be derived from process data and sent as e-mail attachment too.
Our example model has a manual activity where details for a structured data Person and two templates are entered. In the second activity, an email application is invoked using the entered data.
Figure: Templates derived from process data model
Set up the model as follows:
Figure: Email template Parameters
Data for Source and an empty field for Path.
Figure: Email template Attachments
Figure: Input Access Points
To test the example model, deploy the model and start the process. Enter details for Person and upload the template files.
Figure: Email template Data Attachments Runtime
An email similar as in the following screenshot is sent having four files attached.

Figure: Email sample with process data attachment
To manage the correspondences with their clients, Clerks or Business Analysts want a model to indicate which documents are received, which one are missing, etc. In many cases, they want to send an email to:
To achieve this task, E-Mail applications have been extended to derive attachments from a process data of type CORRESPONDENCE.
You can download the predefined CORRESPONDENCE.xsd data type from here:
CORRESPONDENCE.xsd.
The CORRESPONDENCE structured data type has a list of CORRESPONDENCE_ITEM attributes. For details on this data, please refer to chapter Using the predefined Structured Data Type for Correspondence in the End User Handbook.
Each CORRESPONDENCE_ITEM has the following attributes:
| Name | Type | Cardinality | Description |
|---|---|---|---|
| Name | Text | Exactly One | The correspondence name |
| TemplateID | Text | Exactly One | Document ID for outgoing template. Templating should be run if TemplateID is not null and OutgoingDocumentID is null. |
| OutgoingDocumentID | Text | Exactly One | Document ID for outgoing document i.e. contains results after Templating |
| IncomingDocumentID | Text | Exactly One | Used only by Document Triage UI |
| ConvertToPDF | Boolean | Exactly One | If true convert the attachment to PDF before sending it (after processing it as template if applicable). |
| IsAttachment | Boolean | Exactly One | Determines whether the document should be attached to the email or not |
| Required | Boolean | Exactly One | Determines whether the document is required or not |
| Accepted | Boolean | Exactly One | Determines whether the document is accepted or not |
| Comment | Text | Exactly One | A comment about the document (i.e: "Please provide new driver license. The one you provided is expired") |
| ACL | Text | Exactly One | List or roles with read/modify/delete rights |
| RequestedDate | Date | Exactly One | Document requested date |
| ReceivedDate | Date | Exactly One | Document received date |
| DocumentTypeID | Text | Exactly One | DocumentType to be used for incoming document (used by Document Triage UI) |
| DocumentDataPathID | Text | Exactly One | Document "slot" to be used for incoming document e.g. PROCESS_ATTACHMENTS (used by Document Triage UI) |
Figure: CORRESPONDENCE ITEM Structured data
The CORRESPONDENCE data can be used in an email template to access data on all attached documents.
The following example shows how to loop over the documents and access some of their attributes
#foreach ($item in $CORRESPONDENCE.Documents) Document: $item.Name Comment: $item.Comment Accepted: $item.Accepted Required: $item.Required DocumentType: $item.DocumentTypeID #end
The following example illustrates how to use the correspondence documents with email application.
Figure: Correspondence documents in email model
Figure: Email Doc Request Parameter
Figure: Input Access Point for correspondence details

Figure: DOCX template example
Notification.txt, referencing
attributes of input parameter person.
The templating result will be attached to the email.
Figure: The correspondence Template/attachment
Figure: Email with correspondence document
Figure: Email with correspondence document attachment
The following configuration is required for using the templating functionality:
To use templating functionality, you have to add the defaultTemplatingRoutes context reference to
your Camel Context file (e.g.:default-camel-context.xml file under the
stardust-engine-camel-config.jar file in META-INF/spring directory.)
<camelContext id="defaultCamelContext" trace="true"
xmlns="http://camel.apache.org/schema/spring">
<routeContextRef ref="defaultTemplatingRoutes"/>
</camelContext>