# Search syntax

`mail_search` searches every account the key can reach and merges the results newest first.

## Operators
`from:` `to:` `cc:` `subject:` `has:attachment` `is:unread` `is:read` `is:flagged` `in:inbox|sent|drafts|trash|archive|spam` `in:<folder>` `after:YYYY-MM-DD` `before:YYYY-MM-DD` `newer_than:7d` `older_than:30d` `larger:5M` `"exact phrase"` `OR` `-negation`, and free text.

## When a provider cannot
An operator a provider cannot apply is checked on the results where possible; otherwise the account's results come with an OPERATOR_UNSUPPORTED warning. `in:` takes the standard folders or one folder by name (`in:Projects`, any case); an account without that folder answers NOT_FOUND in `warnings`, and the others are still searched. One `in:` per search, and not inside OR or after `-`.
