mail:list

Lists messages in a mailbox, newest first, through whichever connection answers the mail:list capability.

Options

NameTypeDescription
connectionstringThe connection id to read mail with; empty resolves the only connection answering mail:list
mailboxstringThe mailbox to list (default INBOX)
searchstringAn IMAP search expression, e.g. UNSEEN or FROM "billing@" (default ALL)
limitintHow many of the newest matching messages to return (default 20)

Outputs

NameTypeDescription
countintHow many messages matched the search in total
messages[]SummaryHeader summaries of the newest matches, newest first
  ↳ uidstringThe message uid within its mailbox, used by mail:read
  ↳ fromstringThe sender header
  ↳ tostringThe recipients header
  ↳ subjectstringThe decoded subject header
  ↳ datestringThe date header
  ↳ message_idstringThe message-id header

Example

name: List unread billing mail
actions:
  - name: inbox
    component: mail:list
    vars:
      search: UNSEEN FROM "billing@"
      limit: 10

outputs:
  count: "{{ inbox.count }}"
  messages: "{{ inbox.messages }}"