Mail Task Activity
The Mail Task activity enables the automated delivery of email messages to recipients within a process or across different swimlanes. It supports both plain text and HTML formats to ensure compatibility and rich content delivery across various mail clients. This activity requires a functional email server configuration to be established within the system environment prior to execution.
| Field | Description | Requirement |
|---|---|---|
| Exclusive | Ensures jobs run in sequential order when receiving a specific job from a process instance. | Optional |
| Execution listeners | Configures listeners for activity, process, sequence flow, start, and end events. | Optional |
| Multi-instance type | Determines whether multiple instances of the activity are created (None, Parallel, or Sequential). | Optional |
| Cardinality (Multi-instance) | Defines the number of instances to be created using an expression or numeric value. | Optional |
| Collection (Multi-instance) | Specifies a collection where each element triggers the creation of a new instance. | Optional |
| Element Variable (Multi-instance) | Defines the variable name under which each collection element is available to the instance. | Optional |
| Completion Condition (Multi-instance) | An expression that stops the creation of new instances when evaluated to true. | Optional |
| Is for compensation | A flag indicating if the activity is intended for compensation purposes. | Optional |
| Headers | Defines line-separated mail headers for the outgoing message. | Optional |
| To | Specifies the email recipients; multiple addresses must be separated by commas. | Required |
| From | Defines the sender address; defaults to the system configuration if left blank. | Optional |
| Subject | The subject line of the email message. | Required |
| Cc | Specifies Carbon Copy recipients in a comma-separated list. | Optional |
| Bcc | Specifies Blind Carbon Copy recipients in a comma-separated list. | Optional |
| Text | The plain text version of the email body, used as a fallback for non-HTML clients. | Optional |
| Html | The HTML-formatted content of the email, supporting rich text and images. | Optional |
| Charset | Defines the character set used for the email encoding. | Optional |
Action Types & Examples
Execution Listeners
- Format: string
- Example Result: "end"
Multi-instance Type
- Format: string
- Example Result: "parallel"
Cardinality
- Format: digit or expression
- Example Result: "2"
Completion Condition
- Format: boolean expression
- Example Result: "${variable==True}"
Implementation Examples
Field Setup - To: "admin@company.com, user@company.com" - Subject: "Automated Process Notification" - Html: "
Status Update
The workflow has reached the final stage.
" -Charset: "UTF-8" Execution Parameters - Exclusive: "true" - Multi-instance type: "sequential" - Element Variable (Multi-instance): "recipientItem" - Completion Condition: "true"
Technical Notes
The Mail Task activity relies on external SMTP server settings configured at the system level; without these settings, the activity will fail to initialize. When using the Multi-instance type, "Parallel" is recommended for independent user tasks, while "Sequential" is preferred for service-oriented tasks to maintain data integrity. If the "Html" field is populated, it is best practice to also provide a "Text" fallback to ensure the message is readable in all mail environments.