Each email in a mailbox
Yield each email matching the Find emails filters as a dictionary: id, from, subject, received, unread, has_attachments, cc, sent, attachment_count, folder.
Loop type in the Email toolkit · id ooa.email/emails · 17 inputs, no outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Folder | String | No | INBOX | Mail folder; several separated by ; and * for any text, e.g. INBOX; Invoices/*. |
| Unread only | Boolean | No | false | Older steps: only unread emails. New steps choose the status instead. |
| From contains | String | No | Sender contains this text; separate several with ; to match any of them. | |
| Subject contains | String | No | Subject contains this text; in double quotes ("Invoice 7") the whole subject must be exactly that; separate several with ; to match any of them. | |
| Since | DateTime | No | Received on or after this date. | |
| Maximum results | Number | No | 100 | Stop after this many emails; 0 = no limit. |
| Before | DateTime | No | Received before this date. | |
| Read only | Boolean | No | false | Older steps: only emails already read. New steps choose the status instead. |
| To contains | String | No | A To recipient contains this text. | |
| Body contains | String | No | The body contains this text (searched by the server). | |
| Has attachments only | Boolean | No | false | Only emails that have attachments. |
| Oldest first | Boolean | No | false | Give the oldest emails first instead of the newest. |
| Session | String | No | mail | Session name of the open mailbox. |
| With body | Boolean | No | false | Give each email whole: text, HTML, recipients and attachment names (one more request per email); the email stays unread. Without it each email has id, from, subject, received, unread and has_attachments. |
| Status | String | No | any | Which emails: any, only unread or only read. |
| Mark read | Boolean | No | false | Mark each email read when the loop reaches it (IMAP only). |
| Local time | Boolean | No | false | Give dates (and read since and before) in this computer's time zone instead of UTC. |