Mark IMAP Email as Read/Unread
You can use this activity to update the read status of a single email on an IMAP mail server, such as Gmail configured with IMAP. The activity connects to the IMAP server, identifies the specified email in the selected folder, and updates the message status by setting or clearing the Seen flag.
This activity is generally used in automation workflows to manage email processing status. For example:
- Marking an email as Read after successful processing to prevent duplicate processing in subsequent runs
- Marking an email as Unread to allow reprocessing or manual review by a team member.
You must retrieve email messages by using the Read IMAP Mail Messages activity, before using this activity. The retrieved email object contains the identifiers required to locate the email on the IMAP server.
Note: This activity processes one email at a time.To update multiple emails, use a For Each loop to iterate through a collection of email objects and apply this activity to each email.
This table lists the properties for the activity:
| Property Type | Property Name | Data Type | Description |
|---|---|---|---|
| Common | Continue on error | Boolean | The option to continue the RPA flow even if the activity fails. This check box is selected by default. |
| Input | A single IMAP mail object (previously retrieved by the Read IMAP Mail Messages activity). | ||
| Host | Server Address | String | The hostname or IP address of the IMAP server. |
| Host | Port | Int32 | The port number for the IMAP connection (e.g., 993 for SSL). Only 993 supported for Serverless mode. |
| Connection | Security | The security protocol (None, SSL/TLS, STARTTLS). | |
| Connection | Timeout | Int32 | Maximum time in milliseconds to wait before timing out. |
| Credentials | Username | String | The account username to authenticate with the server . |
| Credentials | Password | String | The account password (displayed securely). |
| Options | Mark As Read | Checkbox | If checked, marks as Read; if unchecked, marks as Unread. Checked by default. |
| Output | Response Code | Int32 | Numeric status code - 200 for success, 500/420 for failure |