move messages
This block is part of the imap group and was last modified in core v15.0.1.
move messages v15.0.1 Moves messages by UID into another mailbox : the usual way to file what a flow has processed so the next poll does not see it again.
- flow
flow - connection required
imapconnection - mailbox
valueMailbox the uids belong to. Defaults to
INBOX. - uids
arrayUIDs to move.
- uid
numberA single UID, added to
uids. - destination mailbox required
valueExact name of the mailbox to move into.
- allow mailbox-wide expunge
conditionOn a server with neither MOVE nor UIDPLUS, finishing the move takes an EXPUNGE of the whole mailbox : every message any client flagged
\Deletedgoes with it. Off (default) refuses the move there; on accepts that.
- flow
flow - connection
imapconnection - success
condition - error
value - count
number - destination uids
array
Moves the uids from mailbox (default INBOX) to destination. Uses MOVE when the server offers it, otherwise COPY + \\Deleted + expunge; either way the messages are gone from the source on success. destination_uids holds the new uids when the server reported them (UIDPLUS/MOVE) and is [] otherwise. On a server with neither MOVE nor UIDPLUS the only way to finish is a mailbox-wide EXPUNGE, which also removes every message any client has flagged \Deleted, so the move is REFUSED (nothing copied, nothing flagged) unless allow_mailbox_expunge=true : set it only when this flow owns the mailbox. Find the destination's exact name with imap list mailboxes : folder names are server-specific ('INBOX/Processed', 'Archive', '[Gmail]/All Mail'). Suppressed in a simulation.
archive email |
file email |
imap move |
A typical wiring for move messages: a function trigger starts the flow; move messages feeds the connection pin; value feeds the destination 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 