search_messages
Search an IMAP folder for messages by sender, subject, text, or date filters, and retrieve headers newest first without marking messages as read.
Instructions
Search a folder and return message headers, newest first.
Dates are YYYY-MM-DD and IMAP compares by day only. 'text' is a server side substring search across the whole message and its behaviour varies by server. include_snippet=True adds the first 200 characters of each body, which means downloading every match, so keep the limit small when using it. raw_criteria takes a raw IMAP search string and overrides the other filters. Reading never marks anything as seen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| limit | No | ||
| since | No | ||
| before | No | ||
| folder | No | INBOX | |
| offset | No | ||
| unseen | No | ||
| account | No | ||
| flagged | No | ||
| subject | No | ||
| to_address | No | ||
| from_address | No | ||
| raw_criteria | No | ||
| include_snippet | No |