Searching for Items

Using the search feature (Back to Top)

Searching lets you find messages, contacts appointments, and files.  You can search by specific words, by dates, time, URL, size, tag, whether or not a message has been read, whether it has file attachments or attachments of a particular file type and more.

mail offers two search tools:

  • Search. This is a quick search that executes whatever search query is currently displayed in the search text box. The drop-down arrow at the left of the search box allows you to select which type of items to search for. You can select to search within messages, your contacts, including company contact lists, tasks, appointments and pages and files. This is an aid to quick searches as described in Quick-search settings.
  • Advanced search opens a new pane and makes it easier to execute more complex searches.  You can save your advanced search queries and re-execute them at a later date.

Searching for messages

If you are familiar with text-match searches or word-processing features such as the Find/Change in Microsoft Word, note that the content search in the Mail Client is slightly different from performing a literal string match.

mail search syntax works as follows:

  • You can search for phrases, but each word within that phrase is matched literally by whole-word only. Spelling variants are not allowed. For example, if you search for bananas, messages with banana are not a match. You can search by domain name including the "." (period)
  • Search is not case sensitive; "South", "south", and "SOUTH" are all the same thing.
  • These special characters cannot be used in your search text. ~ ' ! @ # $ % ^ & * () _- + ? / { }[ ] ; : "
  • The asterisk * as a wildcard after a prefix is supported. That is search for do* returns items with the word dog, door, etc.
  • Searching for content will search the body of a message plus any (system-readable) file attachments it may have. A system-readable file attachment is a type of file that can be converted to HTML-viewable text. These include Microsoft Office documents (Word, PowerPoint, or Excel), as well as text files, but not image or audio files.

Learn how to create queries

Go to the following topics for descriptions of how to create complex queries.

Query language description. This describes a list of keywords to use in your search.

AND versus OR Searches. Explains how to use And and Or in your search.

Quick-search (Back to Top)

The mail search feature is a powerful tool. Although you can learn to create complex text queries as described in Query language description, a quick shortcut is to simply type in a name or word, without any keywords. For example, to find all mail containing the word "tim" anywhere in the subject line, to: from: cc: or bcc: lines, message body, or file attachment, you could simply type tim into the search box and click Search.

You can enter any value, such as a word, first name, last name, phone number, or domain name. For contacts in your address books, the field must be a whole word. For example, to search contacts by phone number you would have to enter the full phone number as it appears in the contact entry; you could not search just by the area code alone.

Before you can use the quick search feature, make sure that you have selected the type of item you want to search for. The drop-down arrow on the left of the search box allows you to select which type of items to search for. You can search for messages, personal contacts, personal and shared contacts, the Global Address List contacts, or for all types. When you search for more than one type, the icon displayed in the list lets you know which type of items is included.

To quick-search for contacts in your personal address book:
  1. Click the search menu arrow, , choose Personal Contacts.
  2. Enter a name or other contact data item in the Search text box.
  3. Click Search, to execute the search.
To quick search for email messages:
  1. Click the search menu arrow, , choose Email Messages.
  2. Enter a word, name or other mail-related data item in the Search text box.
  3. Click Search, to execute the search.

Using Advanced search (Back to Top)

The Advanced search features opens separate mini-panes to perform different types of searches. You can open multiple instances of each mini-pane. You might want to do this if you are doing AND type searches.

Advanced search allows you to search by the following criteria:

  • Attachment. No Attachment, Any Attachment, or Specific Attachment. If you select specific attachment, a list of attachment types is displayed.
  • Basic. Uses header information such as From, To, Subject, and Content of the email body.
  • Date. Search for messages received after, on, or before a selected date. Open two Date panes to search between dates.
  • Domain. Search for messages where the address headers (From/To/Cc) contain addresses from certain domains. The domains are pre-defined with check boxes.
  • Folder. Limit search to selected folders only.
  • Saved Search. Open a search query you have saved previously.
  • Size. Search for messages that are larger or smaller than a specified size (bytes, KB, or MB).
  • WebApps. Search for messages or contacts containing URLs, phone numbers, or other objects as defined by the provider.
  • Status. Search for messages or contacts that are flagged or unflagged. Search for messages that are read, unread, forwarded, or replied to.
  • Tag. Search for messages or contacts that have a specific tag or a specified set of tags.
  • Time. Search for messages that arrived within a time-frame, such as the last hour, this week, last month, etc.

Searching for messages (Back to Top)

You can search for messages, conversations, or contacts

  • Using the Search text box to enter your query, as described in Quick-search settings.
  • Using the Advanced search to specify more detailed search criteria.
To search for messages using the Search text box:
  1. Enter search criteria in the Search box such as has:attachment or perhaps the sender's name.
  2. Click the Search arrow, and select the type of search from the list.
  3. Click Search.
To search for a message using detailed criteria:
  1. Click Advanced to open the Advanced search area.
  2. Click icons in the toolbar to open the pane for the type of criteria you want to use for your search.
  3. Enter information. If you enabled the Preferences to Always Show Search String, the Search text box updates as you type or make selections.
  4. As soon as you enter a criteria in a search pane, or as soon as you have made any selection change in any other search pane, such as changing a radio button or a drop-down search option, the search executes.
  5. Items matching the search criteria are listed in the lower right. If the Conversation feature is enabled, conversations containing messages that match the search criteria are listed.
  6. To refresh the search results area, click Search.

Using * as a wildcard in Search (Back to Top)

The asterisk * can be used as a wildcard  in a search to find content that contains words that have similar spellings.  

Use the asterisk * as a wildcard after a prefix. That is search for do* returns items with the word dog, door, etc.

Saving search queries (Back to Top)

If you create a search that you think you will want to use again, you can save it.

  1. Create the search query, either by entering text in the Search bar or by creating a query with Advanced search.
  2. To save the search click on the Search bar. The Save Search dialog opens.
  3. Type the name for your saved search. Searches are saved as a search folder in the Searches section of the Overview pane by default, but you can select another folder.
  4. Click OK. Your search is saved.

To use a saved search, click the search folder. The search results immediately display in the Content pane.

Query language description (Back to Top)

This advanced topic describes in detail the search grammar used for the mail Search feature. Some type of query is always applied to produce the view that you see in the mail interface.

TIP: You can set your Preferences, General tab to 'Always show search string'  to see the current query in the Search toolbar. For example, when this option is enabled, clicking your Inbox folder shows the query string 'in:inbox'.

Search Language Structure

Simple searches can be done by just entering a word into the search field. Bare words (words without a search operator) are interpreted to search in the 'content:' operator -- this matches any text in the message.

More advanced searches can be done by specifying a search operator. A search operator is a special keyword followed by a colon, followed by some other parameter specific to that operator. For example:

  • in:inbox the operator is "in" and the parameter is "inbox" - this returns messages which are in the folder named "inbox"
  • from:someone the operator is "from" and the parameter is "someone" - this returns messages which have the word "someone" in their email address

You can prefix any keyword with the word "not" to specify items that do not have that criterion, for example not in:inbox. Search is case insensitive, meaning that "in:inbox" is the same as "in:Inbox". The minus sign (-) is a synonym for NOT So: not in:inbox is the same as -in:inbox

In most cases, it is not necessary to include punctuation-type characters in your search string, as these are ignored by the search code. There are certain times where this is not true (for example, searching for a time '9:30' in a message) and in those cases you should enclose the search parameter in quotation marks. For example: subject:"9:30" will return messages which have the string 9:30 in the subject.

Allowable characters in the search parameter:

  • The following characters cannot be anywhere in a search parameter unless it is enclosed by quotes: ~ ' ! # $ % ^ & * ( ) _ ? / { }[ ] ; :
  • The following characters are allowed in a search parameter as long as they are not the first character: - + < >

Multiple Search Terms

If multiple search terms are entered (separated by spaces), they are "ANDed" together by default. in:inbox tim means "return me messages which are in the inbox AND which have the word tim in them". For searches using multiple criteria, you can either find items that match one of the specified criteria or all of them. You can perform both types of searches using the Advanced search builder.

For all search panes other than the Basic search, the rules are:

  • Searching for messages that match any of the specified criteria is called an 'OR' search, because if the message contains either X or Y, then it is considered a match. For Advanced search panes with multiple check boxes, making multiple selections within a single pane creates an 'OR 'search for those items.
  • Searching for messages that contain both X and Y is called an 'AND' search, because the message must meet all the specified criteria in order to be considered a match. For Advanced server panes with check boxes, opening multiple instances of the same pane and making different check box selections in each one causes the criteria to be specified as an 'AND' search.

Only "OR" appears in a query. If you selected as an option to show the search query in the Search bar as you make selections in the Advanced search, the Search text box updates to show the resulting query. With the 'AND' type of search, the word 'AND' does not appear.

Tip: Using parenthesis with AND and OR. Words within parentheses are considered as a unit. For example from: (john thomas) is equivalent to from:john AND from:thomas. If you use OR in the parenthesis, from:(john or smith), the search is for results from:john OR from:thomas.

Using * as a wildcard in Search

The asterisk (*) can be used as a wildcard in a search to find content that contains words that have similar spellings.

Use the asterisk * as a wildcard after a prefix. For example, the search string do* returns items such as do, dog, door, etc.

Keyword Descriptions and Examples

content:

Specifies text that the message must contain. For example, content:bananas finds all items containing the word "bananas".

from:

Specifies a sender name or email address that is in the From header. This can be text, as in "John Smith III", an email address such as "joe@acme.com", or a domain.

to:

Same as from: except that it specifies one of the people to whom the email was addressed in the To: header.

cc:

Same as from: except that it specifies a recipient in the Cc: header of the message.

subject:

Specifies text that must appear in the subject header of the message. An example might be subject:"new vacation policy". Use quotes to search for an exact match.

in:

Specifies a folder. For example, in:sent would show all items in your Sent folder.

has:

Specifies an attribute that the message must have. The types of object you can specify are "attachment", "phone", or "url". For example, has:attachment would find all messages which contain one or more attachments of any type.

filename:

Specifies an attachment file name. For example, filename:query.txt would find messages with a file attachment named "query.txt".

type:

Specifies a search within attachments of a specified type. The types of attachment you can specify are "text", "word", "excel", and "pdf". For example, type:word "hello" finds messages with attachments that are Microsoft Word documents and searches within those attachments for the word "hello".

attachment:

Specifies any item with a certain type of attachment. For example, attachment:word would find all messages with Word attachments.

is:

Searches for messages with a certain status. Allowable values are "unread", "read", "flagged", "unflagged", "sent", "draft", "received", "replied", "unreplied", "forwarded", unforwarded", "anywhere", "remote" (in a shared folder), "local", "sent". For example, is: unread will find all unread messages.

date:

Use this keyword to specify a date, using the format that is default for your browser's locale (for US English the format is mm/dd/yyyy). For example, date:2/1/2007 would find messages dated February 1, 2007. The greater than (>) or less than (<) symbols can be used instead of after or before. >= and <= are also allowed.

after:

Specifies mail sent after a certain date. For example, after:2/1/2007 specify mail sent after February 1, 2007.

before:

Same as after: except specifies mail sent before the specified date.

size:

Specifies messages whose total size, including attachments, is a specified number of bytes, kilobytes, or megabytes  For example, size:12 kb would find messages that are exactly 12K in size. The greater than (>) or less than (<) symbols can be used instead of bigger or smaller.

larger:

Similar to size: except specifies greater than the specified size.

smaller:

Similar to size: except specifies smaller than the specified size.

solo:

Finds email messages that do not have a reply to them yet.

tag:

Finds messages which have been tagged with a specified tag. For example, tag:amber will find message that have a tag called "amber" applied.

And vs. Or type searches (Back to Top)

For searches using multiple criteria, you can either find items that match one of the specified criteria or all of them. You can perform both types of searches using the Advanced search.

For all search panes other than the Basic search, the rules are:

  • Searching for messages that match any of the specified criteria is called an OR search, because if the message contains either X or Y, then it is considered a match. For Advanced search panes with multiple check boxes, making multiple selections within a single pane creates an OR search for those items.
  • Searching for messages that contain both X and Y is called an AND search, because the message must meet all the specified criteria in order to be considered a match. For Advanced server  panes with check boxes, opening multiple instances of the same pane and making different check box selections in each one causes the criteria to be specified as an AND search.

For example, suppose you are searching for messages that contain either Adobe PDF files or JPEG images. You would select both these check boxes within the same Attachments pane.

  • Only "OR" appears in a query. If you selected as an option to show the search query in the Search bar as you make selections in the Advanced search, the Search text box updates to show the resulting query. With the AND type of search, the word AND does not appear. The following example shows a search specifying that the From: line must contain "martin", and in addition to this, the name "boxman" must appear in either the To: or the Cc: line.

 

Search examples (Back to Top)

The different panes in the Advanced search area can be used to search by different criteria. The following examples include which Advanced search panes you would use.

Here are a few possible search examples:

  • To search for a specific type of attachment file. A message with next year's budget spreadsheet attached. You don't remember who it's from or what date it was sent, but the filename has an .XLS extension.

Open just the Attachments pane and choose "Specific Attachment." A list of check boxes appears beneath the radio button. Scroll down and check the box next to "Microsoft Excel."

  • To search for a contact within a specific company. A contact who works at a company called "Rivendell".

Use the down-arrow to select Search Contacts. In the Advanced search area, open the Basic search pane and enter "Rivendell" under the Content field. (You could also do this search without using Search Builder.)

  • To search for an attachment that may be one type or another. Messages with either PDF attachments or JPEG attachments.

In the Attachments pane, choose "Specific Attachment" and then check both "Adobe PDF" and "JPEG Image".

  • To search for an item that was tagged. Description of the new procedures for your workgroup, which you had tagged as "High Priority".

Open the Tags pane and select the check box for the High Priority tag. Note that tags are user-defined, so this assumes that you have previously 1) created the tag definition, and 2) applied it to the mail message.

  • To search by a date range. A message someone claims to have sent you "in early December", which you think was never received.

To set a date range, open two instances of the Date pane. In the first one, set the Date drop-down to "is before" and select an end date. Use the other Date pane to specify "is after" and a start date. You can also search by sender.

  • To search for a specific type of attachment that included a specific phrase. A message with a PDF file that contains the phrase "Mixed Nuts"

In the Basic search pane under "Content", enter "Mixed nuts". In the Attachments pane, choose "Specific Attachments" and check "Adobe PDF". Note that the search does not distinguish between content found in the body of an email message versus content found in a file attachment.