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.

In pins 6 + flow
  • flow
    flow
  • connection required
    imapconnection
  • mailbox
    value

    Mailbox the uids belong to. Defaults to INBOX.

    Default INBOX

  • uids
    array

    UIDs to move.

  • uid
    number

    A single UID, added to uids.

  • destination mailbox required
    value

    Exact name of the mailbox to move into.

  • allow mailbox-wide expunge
    condition

    On a server with neither MOVE nor UIDPLUS, finishing the move takes an EXPUNGE of the whole mailbox : every message any client flagged \Deleted goes with it. Off (default) refuses the move there; on accepts that.

    Default false

Out pins 5 + flow
  • 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.

Studio canvas example for the move messages block: typical wiring for move messages.

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