mail:list
Lists messages in a mailbox, newest first, through whichever connection answers the mail:list capability.
Options
| Name | Type | Description |
|---|---|---|
connection | string | The connection id to read mail with; empty resolves the only connection answering mail:list |
mailbox | string | The mailbox to list (default INBOX) |
search | string | An IMAP search expression, e.g. UNSEEN or FROM "billing@" (default ALL) |
limit | int | How many of the newest matching messages to return (default 20) |
Outputs
| Name | Type | Description |
|---|---|---|
count | int | How many messages matched the search in total |
messages | []Summary | Header summaries of the newest matches, newest first |
↳ uid | string | The message uid within its mailbox, used by mail:read |
↳ from | string | The sender header |
↳ to | string | The recipients header |
↳ subject | string | The decoded subject header |
↳ date | string | The date header |
↳ message_id | string | The 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 }}"