Tuesday, October 28, 2008

How to Search Mail in Gmail

Using a number of clever search operators, you can narrow your search significantly and precisely. You can search in the Subject line only, for example, or combine that with a date range, a particular sender, and exclude all messages with attachments.

Use the following operators:

  • subject: - Search the Subject line.
    Example: "subject:KGHouse" finds all messages with "bahamas" in the Subject.
  • from: - Search for sender name and email address. Partial addresses are okay.
    Example: "from:Senthil" finds all messages from "Senthil@gmail.com", but also all messages from "ksenthilraja@gmail.com".
  • to: - Search the To line for names and addresses.
    Example: "to:ksenthilraja@gmail.com" finds all messages sent directly (not via Cc: or Bcc:) to ksenthilraja@gmail.com.
  • cc: - Search recipients in the Cc field.
    Example: "cc:ksenthilraja@gmail.com" finds all messages that were sent to ksenthilraja@gmail.com as a carbon copy.
  • bcc: - Search for addresses and names in the Bcc field. Note this only works with emails you sent to Bcc recipients from Gmail.
    Example: "bcc:senthil" finds all messages that you sent with, for example, "senthil@gmail.com" in the Bcc field.
  • label: - Search for messages assigned a label. (Replace whitespace characters in label names with hyphens.)
    Example: "label:KGHouse" finds all messages labeled "KGHouse".
  • is:starred - Search for messages that are starred.
  • is:unread - Search for new and unread messages.
  • is:read - Search for messages that have already been opened.
  • has:attachment - Search for messages that have files attached to them.
  • filename: - Search within file names of attachments. You can also search for file name extensions to restrict your search to certain file types.
    Example: "filename:.doc" finds all messages with word processing attachments.
  • lang: - Search for messages in a particular language. (Specify the language in English; "Chinese" works, but "Putonghua" or "Mandarin" do not, for example.)
    Example: "lang:French" returns all emails that contain at least un peu de Français.
  • in: - Search in a standard "folder". You can search in Drafts, Inbox, Chats, Sent, Spam, Trash and All (for everything, including Spam and Trash).
    Example: "in:drafts" finds all messages in your Drafts folder.
  • after: - Search for messages sent after a date. The date must given in YYYY/MM/DD format.
    Example: "after:2005/05/05" finds all messages sent or received after (and not including) May 5, 2005.
  • before: - Search for messages sent before a date.
    Example: "before:2005/05/05" finds all messages sent or received on May 4, 2005 and earlier.

Operators and search terms can be combined with the following modifiers:

  • By default, terms are combined with (an invisible) "AND".
    Example: "Senthil Raja" finds all messages that contain both "Senthil" and "Raja".
  • "" - Search for a phrase. Case is disregarded.
    Examples: "Senthil Raja's" finds all messages containing the phrase "Senthil Raja's"; 'subject:"Senthil Raja's' finds all messages that have "Senthil Raja's" in the Subject field.
  • OR - Search for messages containing at least one of two terms or expressions.
    Examples: "senthil or raja" finds messages that contain either "senthil" or "raja" or both; "from:senthil or label:KGHouse" finds messages that either come from a sender that contains "senthil" or appear under the label "KGHouse".
  • - - Search for messages that do not contain a term or expression.
    Examples: "-raja" finds all messages that do not contain the word "raja"; "senthil -raja" finds all messages that contain the word "senthil" but not "raja"; 'subject:"senthil raja" -from:senthil' finds all messages with "senthil raja" in the subject that were not sent from an email address or name containing "senthil".
  • () - Group search terms or expressions.
    Examples: "subject:(senthil raja)" finds messages that have both "senthil" and "raja" somewhere in the Subject line (but not necessarily as a phrase); "from:senthil(subject:(senthil OR raja) OR label:KGHouse)" finds all messages from a sender who has "senthil" in their name that either have "senthil" or "raja" (or both) in the Subject line or appear under the label "KGHouse".

No comments: