E-Mail Send/Receive Application

The E-Mail Send/Receive application allows to send and receive e-mails.

You can perform following operations:

Viewing and Editing Properties

The following properties can be specified:


Figure: Properties - Script Invocation Application

In case you switch to the Integrator profile, UUID and ID options are displayed additionally.


Figure: UUID and UI Properties

Parameters

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.

Accessing the parameters in data flows

The default and added parameters can be set as input access points in data flow to the E-Mail application.

Application Context for Mail Applications
Figure: Mail Application access points

Response

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. Approve, Rejected, etc).


Figure: Response

Configuration

You can use configuration variables for user and password.


Figure: Configuration

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 and Strike through Applies bold, italic and strike through 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.
Normal Enables you to format paragraph of the content.
Maximize Increases the size of the editor.
About CKEditor Displays information about editor.

Test

You can test the application in this tab. Click Reset to initialize the input data and then click Run. 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

Attachments

You can add customized templates for attachments.


Figure: Attachment templates configuration


Figure: Document repository

More details about template creation are described here.

Comments

Click the Comments tab to add comments for the application. The newest comment gets displayed at the top of the table. To add the comment, specify the comment in the text box and click Submit. To delete the comment, select the comment and click the Delete icon. The user, who has submitted the comment, can delete that comment. If the other user selects the comment or no comment is selected, the Delete icon remains in disabled state.


Figure: Comments

Dependency

To use templating functionality, you have to add the following dependencies in your pom.xml file:

<dependency>
	<groupId>com.infinity.integration</groupId>
	<artifactId>camel-templating</artifactId>
	<version>2.1.1</version>
</dependency>
<dependency>
	<groupId>com.infinity.integration</groupId>
	<artifactId>camel-itext-convertor</artifactId>
	<version>2.1.1</version>
</dependency>

Camel context

To use templating functionality, you have also to add the following routes to your Camel Context file (e.g.:default-camel-context.xml file under \WEB-INF\config\ipp\spring folder.)

<route id="templateFromClasspath" autoStartup="true">
         <from uri="direct://templateFromClasspath" />
         <process ref="customVelocityContextAppender" />
         <choice>
            <when>
               <simple>${header.CamelTemplatingLocation} == "classpath"</simple>
               <setHeader headerName="CamelVelocityResourceUri">
                  <simple>${header.CamelTemplatingTemplate}</simple>
               </setHeader>
               <to
                  uri="templating:classpath?format=${header.CamelTemplatingFormat}&template=${header.CamelTemplatingTemplate}&outputName=${header.CamelTemplatingOutputName}" />
                  <choice>
                 <when>
                     <simple>${header.CamelTemplatingConvertToPdf}</simple>
                     <to uri="bean:pdfConverterProcessor?method=process" />
                  </when>
               </choice>
            </when>
         </choice>
         <setHeader headerName="ippDmsDocumentName">
            <simple>$simple{header.CamelTemplatingOutputName}</simple>
         </setHeader>
         <to uri="bean:documentHandler?method=createAttachmentFromExchangeBody" />
</route>

<route id="templateFromRepository" autoStartup="true">
         <from uri="direct://templateFromRepository" />
         <process ref="customVelocityContextAppender" />
         <choice>
            <when>
               <simple>${header.CamelTemplatingLocation} == "repository"</simple>
               <setHeader headerName="ippDmsTargetPath">
                  <simple>templates/${header.CamelTemplatingTemplate}</simple>
               </setHeader>
               <to uri="bean:documentHandler?method=retrieveContent" />
               <setHeader headerName="CamelTemplatingTemplateContent">
                  <simple>$simple{header.ippDmsDocumentContent}</simple>
               </setHeader>
               <to
                  uri="templating:repository?format=${header.CamelTemplatingFormat}&template=${header.CamelTemplatingTemplate}&outputName=${header.CamelTemplatingOutputName}" />
            </when>
         </choice>
         <setHeader headerName="ippDmsDocumentName">
            <simple>$simple{header.CamelTemplatingOutputName}</simple>
         </setHeader>
         <to uri="bean:documentHandler?method=createAttachmentFromExchangeBody" />
</route>