Previous Post: Mail body chapter

  • Basic chapter: sending an email with a fixed mail body to a fixed address
  • Mail body chapter: changing the body of an email using embedded commands
  • Address embed chapter: Changing the address of an email using embedded commands
  • Non-delivery response chapter: troubleshooting when an email has not arrived

Change Email Addresses Using Embedded Commands

With the procedures described in the Basic chapter and Mail body chapter you can now flexibly generate and send the subject and body of an email in a Process. In the Address embed chapter I’ll introduce how to dynamically change the addressee (To) and the sender (From). Since I will continue to instruct you to add changes to the Throwing Message Intermediate Event (Email) test App as before, please open the editing screen and open the Throwing Message Intermediate Event (Email) settings window.

Specify the Process Start User

First, let’s configure the settings to send an email to the Process Start User.

Select Process Start User

When you embed Process Start User in the email body it turns into a username, but in addressee (To) it turns into a string of the name-addr format. That format is the syntax of the username which you can use in the sender (From), the addressee (To), Cc, and Bcc.

For more information on the name-addr format please refer to RFC 5322 specification page here.
RFC 5322 – Internet Message Format

When a Throwing Message Intermediate Event (email) is executed in this state an email from “no-reply@f.questetra.net” or “no-reply@s.questetra.net” is sent to the Process Start User.

Process Start User is embedded in the name-addr format

Process Start User can even be embedded in the Cc and Bcc fields. For example, if it is embedded in the Cc field a copy of the email will be sent to the Process Start User.

Specify User-type Data Item

Now let’s see how to specify an email address using the values in a Data Item entered at the Confirmation Task. For Users registered in Questetra BPM Suite you can specify an email address with a User-type Data Item. Let’s try sending an email by embedding the email address specified with the User-type Data Item into the “To” field.

Create a User-type Data Item and set its Data editing permission to Editable in the Confirmation Task. The Form Type would be better as a Search Select Box. Then embed that Data Item in the addressee (To) of the Throwing Message Intermediate Event (email) and save and release the App.

Embed the created User-type Data Item into the addressee (To)

For example, if you specify Sumatra at the Confirmation Task an email will be sent to Sumatra as in the figure below.

Example case where the User Sumatra has been specified

Specify String-type Data Item

If you specify an email address with String-type Data Item it doesn’t matter if Questetra BPM Suite has no email address information. Let’s create a String Data Item, set its Data editing permission to Editable at the Confirmation Task, and embed it to the addressee (To) of the Throwing Message Intermediate Event (email).

Embed String-type Data Items to the addressee (To)

Enter an email address in a String-type Data Item at the Confirmation Task

If you set a String-type Data Item to be editable in the Human Task Properties it will enable you to input in the text box. Therefore, if the addressee is embedded with a String-type Data Item the Process Start User can freely enter any email address.

Also, by selecting Text Box multiple lines in the String-type Data Item it enables you to specify multiple email addresses in each field of the Throwing Message Intermediate Event (email). If you enter multiple email addresses with the new-line delimited, it will be sent like the example below.

Set a “multiple lines” String-type Data Item and enter multiple email addresses with new-line delimited.

An email is sent to “Sumatra” and “Oahu”

Specify multiple Data Items

You can specify multiple email addresses by embedding multiple Data Items in one field. For instance, by embedding both a User-type Data Item “User” and “Process Start User” in the addressee (To) it results as follows.

Embed multiple Data Items and separate them with commas

Delivered to email addresses of both

Specify with a Select-type Data Item

By selecting Check Box in a Select-type Data Item you can specify multiple email addresses using the following method.

Create a Select-type Data Item and open the Choice settings window by clicking the Edit button. When you select “Fixed choice list” you will be able to set the options manually. Let’s enter an email address into the Choice ID section and its name into the Label section as in the screenshot below. Consequently, the string that will be embedded in the Throwing Message Intermediate Event (email) is the contents of the Label.

Select “Fixed choice list” and enter the choices you want to prepare

Also, in order to enable multiple selections select Check Box in the Form Type. There are two ways to enter the choices: adding with the “+” button and adding with the “Edit in CSV format” function.

The procedure is the same as for other data types: create a Select-type Data Item and set the Data editing permission so that it becomes editable in the Confirmation Task, and embedding the Data Item in the Throwing Message Intermediate Event (email).

Embed the created Select-type Data Item

Save and release the App and start its Process. For example, in the case of checking the Sumatra and Canarias boxes, you can confirm that your choices are embedded in the name-addr format in the options list as in the following figure.


Specify the sender as a fixed value in the name-addr format

Finally, I will describe the address setting of the sender (From) when you enter a fixed value. As I’ve introduced the setting of the addressee (To), also the sender (From) can be specified using the settings in the Throwing Message Intermediate Event (email).

Enter an email address in the sender (From)

From has changed

You can also specify the display name by entering in accordance with the name-addr format as follows:

Enter a name following the name-addr format

It was received with the name-addr format as well as the specified username

I recommend that you set a Sender Policy Framework (SPF) if you change the sender (From) to avoid emails sent by the App being identified as a spam email. By setting the SPF properly you can prove that it is not spam even when you send an email with your email address in Questetra BPM Suite.

For more information about SPF, please refer to Wikipedia, etc.
Sender Policy Framework – Wikipedia

SPF settings can be done by registering TXT records in the DNS of the domain which your email address uses. The setting method differs depending on the domain host, so please contact your service provider for the specific procedure. Please refer to the following article about the settings values.


In this article, I covered only the sender (From) and addressee (To) of the Throwing Message Intermediate Event (email), but data embedding can be performed in the Cc and Bcc fields as well. Please combine these to create the perfect App for your work!

Next is Non-delivery response chapter

%d bloggers like this: