list mailboxes

This block is part of the imap group and was last modified in core v15.0.1.

list mailboxes v15.0.1

Lists the mailboxes (folders) on the account, with their special-use role (inbox, sent, trash, …) and, optionally, their message counts.

In pins 3 + flow
  • flow
    flow
  • connection required
    imapconnection
  • pattern
    value

    LIST pattern. * (default) lists every mailbox; % the top level only.

    Default *

  • with status
    condition

    Also report messages, unseen, uid_next and uid_validity per mailbox.

    Default false

Out pins 5 + flow
  • flow
    flow
  • connection
    imapconnection
  • success
    condition
  • error
    value
  • mailboxes
    array
  • count
    number

Runs LIST on the connection and outputs mailboxes: [{ name, delimiter, attributes[], role, has_children, selectable }] plus count. role is 'inbox', 'sent', 'drafts', 'trash', 'junk', 'archive', 'all', 'flagged', 'important' or '' : use it to find the Trash or Sent folder without guessing its localized name. with_status=true adds messages, unseen, uid_next and uid_validity per selectable mailbox (one STATUS per mailbox on servers without LIST-STATUS, so leave it off when you only need names). pattern is an IMAP LIST pattern ('*' for everything, 'INBOX/%' for the inbox's direct children). Suppressed in a simulation.

folders
imap list

A typical wiring for list mailboxes: a function trigger starts the flow; move messages feeds the connection pin; the flow out pin feeds debug.

Studio canvas example for the list mailboxes block: typical wiring for list mailboxes.

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