# Mail

## <span style="font-weight: 400;">Definition</span>

<span style="font-weight: 400;">This step allows you to configure the necessary parameters to send an email when the flow reaches this point. That mail will be an informative mail, and the receptor could not perform any action from the mail.</span>

<span style="font-weight: 400;">To send mail, you will need to configure mail server parameters. You can visit the [Soffid parameters page](https://bookstack.soffid.com/books/soffid-3-reference-guide/page/soffid-parameters "Soffid parameters") for more information.</span>

## <span style="font-weight: 400;">Steps Tabs</span>

### <span style="font-weight: 400;">Task details</span>

When you select the Mail Step type, you could configure the mail information to send and the recipients of that information.

- **Identities(s):** User, group, role, or email which is the recipient.
- **Email address(es):** Set one or more valid email addresses.
- **Subject:** Subject of the mail.
- **Email message:** Message of the mail.

### <span style="font-weight: 400;">Incoming transitions</span>

<span style="font-weight: 400;">The Incoming transitions tab displays the previous steps where the flow comes from. When you create a process from a template or from scratch default incoming transitions are defined. It is allowed to customize the default setup, add new transitions, or delete transitions.</span>

- **From**: the previous step, where the flow comes. Allows you to select where the workflow comes from.
- **Incoming transition**: brief name to identify the transition. That is the name of the action the form will show to the final user.
- **To**: current step.
- **Action**: allows creating a custom script to perform specific actions.

<div id="bkmrk-when-you-create-an-i">When you create an incoming transition, Soffid creates the proper outcoming transition.</div>##### Example

Get the selected user, first name, and operation from the previous step:

```Java
selector = executionContext.getVariable("userSelector");
user = serviceLocator.getUserService().findUserByUserName(selector);
executionContext.setVariable("testName", user.firstName);
executionContext.setVariable("testOperation", "CHECK");
```

### <span style="font-weight: 400;">Outgoing transitions</span>

The Outcoming transition tab displays the next steps where the flow can go from the current step. When you create a process from a template or from scratch default outcoming transitions are defined. It is allowed to customize the default setup, add new transitions, or delete transitions.

- **From**: current step.
- **Incoming transition**: name of the transition.
- **To**: the next step, where the flow goes.
- **Action**: allows creating a custom script to perform specific actions.

When you create an outcoming transition, Soffid creates the proper incoming transition.

##### Example

Get the account list associated with a user to perform some actions:

```Java
userName = executionContext.getVariable("userName");
accountList = serviceLocator.getAccountService().findAccountByJsonQuery("name eq \"" + userName + "\" AND (type eq \"P\" or type eq \"S\" or type eq \"I\")");
for (account:accountList) {
  //TO-DO
}
                                                                        
```

---

[*\* https://es.wikipedia.org/wiki/Expression\_Language*](https://es.wikipedia.org/wiki/Expression_Language)