Working with the Email Task

This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with the Email Task

The Email Task allows you to send an email within a BPMN Process. It is configured with the following properties. 

Field Name

Mandatory

Description

Field Name

Mandatory

Description

To

Yes

The email address of the intended recipient of the email. Multiple recipients can be specified as comma-separated email addresses.

From

No

The email address of the sender. If this field is not specified, the default email address specified in the activiti.xml file will be used.

Subject

No

Subject of the email.

CC

No

The email addresses of the carbon copy receivers of the email. Multiple recipients are separated by commas.

Bcc

No

The email addresses of the blind carbon copy receivers of the e-mail. Multiple recipients are separated by commas.

Charset

No

Charset of the email can be changed.

Html

No

The content of email is in HTML format.

Text

No

Content is in non-HTML format.

Sample Email Server Configuration

The Activiti engine sends e-mails using an external mail server. The following steps guide you through a sample email server configuration for the Email task. 

  1. Set the following properties in the activiti.xml configuration file found in the <EI_HOME>/wso2/business-process/conf directory. The following code block provides a sample of these settings using the Gmail configuration settings. 

    <property name="mailServerHost" value="smtp.gmail.com"/> <property name="mailServerPort" value="456"/> <property name="mailServerDefaultFrom" value="mailtask@gmail.com"/> <property name="mailServerUseSSL" value="true"/> <property name="mailServerUsername" value="mailtask@gmail.com"/> <property name="mailServerPassword" value="mailtask123"/>
  2. Copy the following jar files into the <EI_HOME>/lib directory and restart the server.