# Delete Mail

> `UiPath.MicrosoftOffice365.Activities.Mail.DeleteMail`

`UiPath.MicrosoftOffice365.Activities.Mail.DeleteMail`

## **Description**

Uses the Microsoft Graph [Delete message](https://docs.microsoft.com/en-us/graph/api/message-delete?view=graph-rest-1.0&tabs=http) API to delete an email message.

### Scopes

This activity requires the following scopes:

* Mail.ReadWrite

OR

* Mail.ReadWrite.Shared

## Project compatibility

Windows - Legacy | Windows

## **Configuration**

**Properties**

#### 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.
  :::
* **Message** - The message to delete. This field supports only `Office365Message` variables.
* **PermanentlyDelete** - Indicates whether to delete the email permanently. This field supports Boolean values. The default value is **False**.

#### Misc

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