Skip to main content

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​

InputTypeRequiredDefaultWhat it is
FolderStringNoINBOXMail folder; several separated by ; and * for any text, e.g. INBOX; Invoices/*.
Unread onlyBooleanNofalseOlder steps: only unread emails. New steps choose the status instead.
From containsStringNoSender contains this text; separate several with ; to match any of them.
Subject containsStringNoSubject contains this text; in double quotes ("Invoice 7") the whole subject must be exactly that; separate several with ; to match any of them.
SinceDateTimeNoReceived on or after this date.
Maximum resultsNumberNo100Stop after this many emails; 0 = no limit.
BeforeDateTimeNoReceived before this date.
Read onlyBooleanNofalseOlder steps: only emails already read. New steps choose the status instead.
To containsStringNoA To recipient contains this text.
Body containsStringNoThe body contains this text (searched by the server).
Has attachments onlyBooleanNofalseOnly emails that have attachments.
Oldest firstBooleanNofalseGive the oldest emails first instead of the newest.
SessionStringNomailSession name of the open mailbox.
With bodyBooleanNofalseGive 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.
StatusStringNoanyWhich emails: any, only unread or only read.
Mark readBooleanNofalseMark each email read when the loop reaches it (IMAP only).
Local timeBooleanNofalseGive dates (and read since and before) in this computer's time zone instead of UTC.