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.

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 delete.

  • uid
    number

    A single UID, added to uids.

  • expunge
    condition

    Remove the messages permanently (default). Off only flags them.

    Default true

  • allow mailbox-wide expunge
    condition

    On a server without UIDPLUS the only expunge is the whole mailbox's : every message any client flagged \Deleted goes with it. Off (default) refuses the expunge there; on accepts that.

    Default false

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

Studio canvas example for the delete messages block: typical wiring for delete 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