--- title: "Delete Email" slug: "delete-email" description: "Flows can download, list and delete email messages from either an IMAP or POP mail server. You can configure the Delete component to delete emails that meet certain criteria." tags: ["email", "email server", "delete", "imap", "POP"] updated: 2022-10-21T19:35:13Z published: 2022-10-21T19:35:13Z canonical: "documentation.decisions.com/delete-email" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt > Use this file to discover all available pages before exploring further. # Delete Email | ## Step Details | | --- | | **Introduced in Version** | --- | | **Last Modified in Version** | 7.12.0 | | **Location** | Communication > Email | A **Flow** can be configured to delete all emails sent by one sender, the first or last email in an account, a set count of emails, unread emails, or even all emails from an account for either an IMAP or POP mail server. The **Delete** step uses the **U****nique Id** for an email as input, then sends the command to a mail server for the messages that meet the criteria to be deleted. --- ## Properties #### Settings | Property | Description | Data Type | | --- | --- | --- | | Purge Deleted | Permanently removes all messages marked as deleted from the specified folder. | Boolean | #### Inputs | Property | Description | Data Type | | --- | --- | --- | | Folder | Name of the Folder the emails are located in. (Inbox, Spam, Trash, etc.) | String | | OAuth Token | Allows a user to specify the IMAP or POP3 email server token. (Requires: email account configured for OAuth and POP3 or IMAP; [OAuth Provider](https://documentation.decisions.com/docs/establishing-an-oauth-provider) and [Token](https://documentation.decisions.com/docs/creating-oauth-tokens) for POP3 or IMAP). | String | | Password | The password of the user connecting to the email server. | String | | Port | Port number of the email server. | Int32 | | Secure Connection | Used if the email server credentials require a secure connection (must be true when using OAuth for POP3 or IMAP). | Boolean | | Server | IMAP or POP email server. | String | | Unique ID | The Get Email step uses a Unique Id to retrieve the full message from an Email. This field assumes that previous steps may output more than one Message Header to get a certain message category. | String | | Use OAuth | Specifies the use of OAuth authentication. | Boolean | | Username | Username to connect to the email server. | String | #### Outputs | Property | Description | Data Type | | --- | --- | --- | | None | --- | --- | #### ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1645472927234.png)