delete messages
This block is part of the imap group and was last modified in core v15.0.1.
delete messages v15.0.1 Deletes messages by UID: flags them \Deleted and, by default, expunges them from the mailbox. Prefer imap move to the Trash folder when the account has one.
- flow
flow - connection required
imapconnection - mailbox
valueMailbox the uids belong to. Defaults to
INBOX. - uids
arrayUIDs to delete.
- uid
numberA single UID, added to
uids. - expunge
conditionRemove the messages permanently (default). Off only flags them.
- allow mailbox-wide expunge
conditionOn a server without UIDPLUS the only expunge is the whole mailbox's : every message any client flagged
\Deletedgoes with it. Off (default) refuses the expunge there; on accepts that.
- flow
flow - connection
imapconnection - success
condition - error
value - count
number
Flags the uids \\Deleted in mailbox (default INBOX) and, with expunge=true (default), removes them permanently. expunge=false only sets the flag, for a mail client to act on. On a server without UIDPLUS the only expunge covers the whole mailbox (every message any client flagged \Deleted), so an expunging delete is REFUSED there before anything is flagged unless allow_mailbox_expunge=true : otherwise use expunge=false, or move to Trash. This is permanent : to keep a copy, imap move to Trash instead. Suppressed in a simulation.
remove email |
expunge |
imap delete |
A typical wiring for delete messages: a function trigger starts the flow; move messages feeds the connection pin; the flow out pin feeds debug.
Version history
Introduced in v15.0.1.
Back to
imap Return to the main group to view all sub-groups Back to imap Return to the group to view all blocks within this group 