When composing advanced searches in Gmail you can jump to the advanced search form or you can structure you search directly into the search text box.
Here are the operators to apply in the advanced search box:
- The Basics:
- to: Search for messages sent to a specific address.
- from: Search for messages sent from a specific address
- subject: Search the subject field.
- label: Search within a specific label.
- has:attachment – Search only for messages that have attachments. You can also add an attachment suffix to the search terms to just see items with attachments of a certain type. For example PDF has:attachment will show you emails with PDFs attached.
- is:chat – Search only chats.
- in:anywhere – Also search for messages in the spam and trash. By default, Gmail’s search ignores messages in the spam and trash.
- ( ) – Brackets allow you to group search terms. For example, searching for subject:(how awesome) would only return messages with the words “how” and “awesome” in their subject field. If you search for subject:how awesome, you’d get messages with “how” in their subject and “awesome” anywhere in the message.
- OR – OR, which must be in capital letters, allows you to search for one term or another. For example, subject:(how OR awesome) would return messages with the word “how” or the word “awesome” in their titles. You can also combine other terms with the OR. For example, from: OR has:attachment would search for messages that are either from or have attachments.
- “ “ – Quotes allow you to search for an exact phrase, just like in Google. Searching for “exact phrase” only returns messages that contain the exact phrase. You can combine this with other operators. For example, subject:”exact phrase” only returns messages that have “exact phrase” in their subject field.
- – – The hyphen, or minus sign, allows to search for messages that don’t contain a specific term. For example, search for -from: and you’ll only see messages that aren’t from .
- list: – The list: operator allows you to search for messages on a mailing list. For example, list: would return all messages on the mailing list.
- filename: – The filename: operator lets you search for a specific file attachment. For example, file:example.pdf would return emails with a file named example.pdf attached.
- is:important, label:important – If you use Gmail’s priority inbox, you can use the is:important or label:important operators to search only important or unimportant emails.
- has:yellow-star, has:red-star, etc. – If you use different types of stars (see the Stars section on Gmail’s general settings pane), you can search for messages with a specific type of star.
- cc:, bcc: – The cc: and bcc: features let you search for messages where a specific address was carbon copied or blind carbon copied. For example, cc: returns messages where was carbon copied. You can’t use the bcc: operator to search for messages where you were blind carbon copied, only messages where you bcc’d other people.
- deliveredto: – The deliveredto: operator looks for messages delivered to a specific address. For example, if you have multiple accounts in the same Gmail inbox, you can use this operator to find the messages sent to a specific address. Use deliveredto: to find messages delivered to .