Task Messaging - Email - Delete Single Message
The Email - Delete single message Task deletes one message, found by its ID or its index, using a POP3, IMAP4, Exchange EWS, Exchange WebDAV or Microsoft Graph API Connection.
warning
If both ID and Index are filled in, the Task deletes the first message in the folder whose ID or index matches, which can be a different message from the one that ID names. Fill in only ID. VisualCron keeps no copy of a deleted message.
The Main settings, Flow, On error, Conditions and TimeOut tabs are the same for every Task; see Job - Tasks.
Email - Delete single message tab

- Connection: the Connection to the mailbox, of one of these types: Connection - POP3, Connection - IMAP4, Connection - Exchange EWS, Connection - Exchange WebDAV or Connection - Microsoft Graph API
- Mail identifier: fill in ID or Index
- ID: the unique ID of the message, as written in the ID field by Task Messaging - Email - Get Headers. Variables are resolved
- Index: the position of the message in the folder. It changes as messages arrive or are deleted, so prefer ID
The message is looked up in the default folder of the mailbox, the Inbox, only.
Output and errors
- When the message is deleted, standard output has the line
<ID> successfully deleted - If the message cannot be deleted, the Task fails
- If the Connection is missing, the Task fails with "Connection not found"
warning
When no message matches, "Message not found or already deleted" or "Message not found" is written to standard error, and the Task reports success.