To find a message, simply type one or more keywords into the "Search mail" box in the mail toolbar and hit enter. By default, all folders except Spam and Trash will be searched. If you are currently in the Spam or Trash folder, then just that folder will be searched instead.
If you're having trouble finding what you're looking for, you can create a more precise search using our advanced search builder:
This allows you to look for the keywords in specific places (for example the
Subject fields), set the date range you want to search and specify whether the email must be unread or pinned, or have a particular type of attachment.
After performing a search, the search term appears in the sidebar on the left of the screen. Click the "Save" button next to the search term to save it for quick reuse.
You can build detailed searches directly in the mail search box, using a special syntax of keywords, boolean flags and operators to combine multiple options together.
By default, all folders will be searched except Spam and Trash. You can include these folders as well by adding
in:* to your search. You can also use the
in keyword to restrict your search to specific folders, e.g.
in:Inbox OR in:Drafts. To specify a subfolder when using the
in keyword, use a
. to separate the subfolder's name from the parent folder, e.g.
substr:(<other search terms>)
Phrases are matched on a complete basis with stemming (all different forms of the same word are treated as equivalent). This means, for example, a search for
bus will match "buses" but not "business".
If you want to search for a phrase with spaces in it, use quotes for the phrase part (either
", but matched), e.g.
from:"Joe Bloggs" or
subject:'string with "double" quotes', but not
from:Joe Bloggs or
subject:"must end with same'. You can also use
\\ to match a literal ", ' and \ respectively in a phrase.
When searching for a phrase in a specific header, you must put a space between the header name and the phrase. Therefore, the term must be wrapped in a quote, e.g.
substr to wrap other search terms changes their behaviour. Instead of matching stemmed whole words, search terms will be matched on a straightforward "contains" basis. This means that even partial words or parts within words will match. For example,
substr:(from:ber) will match an email from "Robert", because "ber" is contained in "Robert". Please note that searching for substrings will be significantly slower than regular searches.
A date can be either absolute (e.g.
date:"30 sep 2010") or relative (e.g.
date:"2 weeks ago"). Most forms of writing a date are accepted. It also supports integers with units,
m (month) or
y (year). So
date:2w is equivalent to
date:"2 weeks ago".
A size is a number specified in bytes, with an optional suffix
The following boolean states can be specified with the
For backwards compatibility, we also support writing a boolean term in UPPERCASE without the
in keyword prefix. For example, the searches
UNSEEN HASATT or
is:unread has:attachment are equivalent, and will both show all unread messages with attachments.
The filetype keyword finds emails with attachments of the given type. It does this by looking at the MIME type of the attachments. Some systems may generate emails with attachments with the wrong or "missing" MIME types, in which case the search may unfortunately fail to find the expected emails.
imap:<raw imap search>
If you know the message id you are searching for, you can use the
msgid keyword to find it directly.
A value in
imap:"…" is passed directly to the IMAP server. See the IMAP specification for full details.
The IMAP search syntax is arcane and difficult to use, and pretty much everything can be done using the much easier standard syntax described above.
Operators must always be uppercase.
AND— doesn't do anything, since this is the default when multiple keywords/booleans are specified.
from:rob OR from:jeremy. Applies just to the terms on either side.
NOT— applies just to the term afterwards. For example,
since:"1 week ago" from:rob NOT subject:"new web interface"would find any messages from Rob in the last week that are not about the "new web interface".
()— grouping, e.g.
(from:rob subject:"new web interface") OR subject:urgent.