Documentation

DocumentationGetting StartedSearch with advanced, Gmail-style queries

Search with advanced, Gmail-style queries

Mailspring builds a search index on your computer, so you can search through your email in seconds. In addition to searching for an email by a name, email address, or subject line, you can search in more advanced ways.

Search message contents

When you view an email message, Mailspring caches it’s content so you can search for it later. Your search queries can include words, phrases, and URLs used in the body of an email.

Search for multiple phrases

Mailspring supports the AND and OR search operators, so you can search for emails based on multiple criteria, for example:

“from:careless@foundry376.com OR from:bengotow@gmail.com”

Search in a specific label or folder

To search a specific folder or label, use the “in:” keyword in the search bar. For example, to search your sent messages for “contract”, you’d say:

“contract in:sent”

Operators you can use

  • from:, to:, subject: — e.g. from:ben subject:invoice
  • in: a folder or label — in:sent, in:"Receipts/Uber"
  • is:unread, is:read, is:starred, is:unstarred
  • has:attachment
  • before:, after: (or since:) with a date or a phrase — after:"last month", before:2024-01-01, since:"2 weeks ago"
  • AND, OR, NOT, and parentheses — from:"Code Mouse" AND NOT in:forums

Put multi-word values in quotes. Words without an operator are matched against the sender, subject, and message text.

Searching everywhere

The search box at the top searches the account selected in the sidebar; choose All Accounts first to search every mailbox. Results exclude Trash and Spam unless you click Search messages in trash and spam at the top of the results. A handy trick: is:unread with All Accounts selected shows unread mail in every folder, not just the inbox like the sidebar's Unread item does.

Search runs against Mailspring's local cache, not your mail server. Every message header is searchable once the account has finished its initial sync, but message bodies are only indexed for mail from roughly the last three months and for older messages you've opened. If a very old message doesn't turn up when you search for a phrase in its body, try searching by sender or subject instead.

Can’t find what you’re looking for?

Ask in the Mailspring community — the team and other users are there to help.

Visit the Community