# Forward Mail

> `UiPath.MicrosoftOffice365.Activities.Mail.ForwardMail`

`UiPath.MicrosoftOffice365.Activities.Mail.ForwardMail`

## **Description**

Uses the Microsoft Graph [Create forward](https://docs.microsoft.com/en-us/graph/api/message-createforward?view=graph-rest-1.0&tabs=http) and [Forward event message](https://docs.microsoft.com/en-us/graph/api/message-forward?view=graph-rest-1.0&tabs=http) API to forward a message (**Message**), with additional content (**Body**), to one or more recipients (**To**).

### Scopes

This activity requires the following scopes:

* Mail.ReadWrite AND Mail.Send

OR

* Mail.ReadWrite AND Mail.Send.Shared

OR

* Mail.ReadWrite.Shared AND Mail.Send

OR

* Mail.ReadWrite.Shared AND Mail.Send.Shared

## Project compatibility

Windows - Legacy | Windows

## Configuration

**Properties**

#### **Attachments**

* **Attachments** - A collection containing the paths to the files to be attached to the email.
* **Attachments Collection** - An additional list of files to be attached to the email.
* **Replace Existing** - Indicates whether to replace the existing attachments with the same name. This field supports Boolean values.

#### Common

* **DisplayName** - The display name of the activity. This property supports `String` variables and string formatted values.

#### Input

* **Account** - (Optional) The email address with which to interact. This may include any shared mailbox to which the current user has access rights. If left blank, the current user's account is assumed. This property supports `String` variables and string formatted values.

  :::note
  **Account** field is mandatory for **ApplicationIdAndSecret** and **ApplicationIdAndCertificate** authentication types.
  :::
* **Body** - The email's message body. This property supports `String` variables and string formatted values.
* **Message** - The email to forward. This field supports only `Office365Message` variables. Enter the **Result** output property variable from the [Get Mail](https://docs.uipath.com/activities/other/latest/productivity/office365-get-mail) activity and specify the item in the array that you want to use (e.g., *foundMessages(0)*).
* **New Subject** - The new subject of the email. If left blank, the original subject is used. This property supports `String` variables and string formatted values.

#### Misc

* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports Boolean values.

#### Options

* **Is Draft** - If selected, the message is saved as a draft and not sent. This field supports Boolean values.

#### **Recipients**

* **BCC** - A list of additional email addresses that you want to add as Bcc recipients. This field supports only `String[]` variables.
* **CC** - A list of additional email addresses that you want to add as Cc recipients. This field supports only `String[]` variables.
* **To** - A comma-separated list of email addresses that you want to send your mail forward to. This field supports only `String[]` variables.

  :::note
  To enter one email address, include it between { } and declare it with " " (e.g., *{"user@uipath.com"}*). To enter multiple email addresses, include all between { }, declare each with " ", and separate each by a comma (e.g., *{"user@uipath.com","test@uipath.com"}*).
  :::

## How it works

The following steps and message sequence diagram is an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.

1. Complete the steps.
2. Add the [Microsoft Office 365 Scope](https://docs.uipath.com/activities/other/latest/productivity/microsoft-office-365-scope) activity to your project.
3. Add an activity or run an external process that outputs a `Office365Message` object (e.g., [Get Mail](https://docs.uipath.com/activities/other/latest/productivity/office365-get-mail)).
4. Add the **Forward Mail** activity inside the **Microsoft Office 365 Scope** activity.
5. Enter values for the Input properties.
6. Run the activity.
   * Your input property values are sent to the [CreateForward](https://docs.microsoft.com/en-us/graph/api/message-createforward?view=graph-rest-1.0&tabs=http) and [Forward](https://docs.microsoft.com/en-us/graph/api/message-forward?view=graph-rest-1.0&tabs=http) APIs.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-180140-bb68d053.webp)
