---
schema_version: "1"
id: f1248c3aa9cacbea3bfb9b7a337406b8f75e0b04a01a946d6f4d76112db29d3c
title: Mail Session
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/rpa-builder/latest/toolbox-mail-operations-mail-session.md
canonical_url: https://docs.mulesoft.com/rpa-builder/latest/toolbox-mail-operations-mail-session
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 8222c8b5cdbac8eee347ee35adeb032dcac49a0497a4a6f24cc1a46c45cd35f1
description: MuleSoft Documentation Site
release: "6.7"
latest: true
---
---
product: RPA Builder
version: 6.7
is-latest-version: true
---

# Mail Session

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

The _Mail Session_ action step is, similar to the Excel Session, an inclusive element for all mail
operations.

The mail operations consist of reading mail (Read Mail), sending mail (Send Mail), and changing
e-mails (Set Mail), for example, setting the status of a mail to _unread_ or moving it to a
different folder.

With the _Mail Session_ action step, you can establish a connection to a mail server.

## Properties

**Incoming Mail Operation Settings**

**Encryption used** (Encryption) Displays which encryption protocol is used, SSL/TLS or STARTTLS.

**Operation mode** Here you see which area is activated in the mail session. You can choose between
three different modes in the wizard.

**Protocol used** (Mail Protocol) Displays which communication protocol is used, IMAP, Exchange or
POP3.

**Server address** (String) Here, you see the server address that is entered in the wizard.

**Server Port** (Integer, Default: 143) Here, you see the selected port.

**Outgoing Mail Operation Setting**

**Send Mails** (String) If you select this checkbox, the SMTP Mail Session is established.

**Send test mail to** (String) E-mail address to which the test mail is to be sent.

**SMTP Server address** (String) Here, you see the URL of the selected SMTP mail server.

**SMTP Server Port** (Integer) Displays the selected port.

**Use Different Credentials**\* (Boolean) If the checkmark is set here, you can set different
credentials to those specified under Incoming Mail - User account for outgoing mail.

## Inbound Variables

**Incoming Mail**

**Server address**

**Server port** (Integer) Displays the selected port.

**User account** Login data that you require to log in to the server.

**Outgoing Mail**

**SMTP Server address** (String) Here, you see the URL of the selected SMTP mail server.

**SMTP User account** Login data that you require to log in to the SMTP server.

**Use Different Credentials**\* (Boolean) If the checkmark is set here, you can set different
credentials to those specified under Incoming Mail - User account for outgoing mail.

## Outbound Variables

The _Mail Session_ action step has no outbound variables.

## Wizard

The wizard is split into following sections: **Operation Mode**, **Incoming Mail** and **Outgoing
Mail**.

In the Operation mode you determine what exactly should happen in the Mail Session and which area is
activated in the Mail Session. The following modes are available:

- **Read and send mails** Here you can configure the Incoming and Outgoing Mail areas. This means,
  you can read and send mails.

- **Read mails from inbox** Only the Incoming Mail section can be edited here. This means that you
  can only read mails.

- **Send mails via SMTP** Only the Outgoing Mail section can be edited here. In this case, mails are
  sent only.

> [!NOTE] If you have selected the _Send mails via SMTP_ mode, no Read mail action step can be used
> in the Mail Session. This is also true if you have selected the _Read mails from inbox_ mode. In
> this case, no Send Mail action step can be used.

In the Incoming Mail area, you can make all the settings necessary to import e-mails from an e-mail
server. Here, you can also find the **Test Connection Button**. You can use this to test whether the
connection to the mail server can be established.

The Outgoing Mail area opens if you select the checkbox **Send mails**. If you wish to send e-mails,
enter the SMTP mail server settings here. If the login data differs from the Incoming Mails, select
the option _Use different credentials or Use no authentication_. You can then enter different login
data. With _Use no authentication_ you only need a user name.

Using the **Send test mail** button, you can check the connection to the SMTP server and send a test
mail. Enter the e-mail address under **Send test mail to**.

## See Also

- [Read Mail](https://docs.mulesoft.com/rpa-builder/latest/toolbox-mail-operations-read-mail)

- [Send Mail](https://docs.mulesoft.com/rpa-builder/latest/toolbox-mail-operations-send-mail)

- [Set Mail](https://docs.mulesoft.com/rpa-builder/latest/toolbox-mail-operations-set-mail)
