How do I sort my email using Gmail or Google Apps to show unread messages first?
How do I find an email between certain dates using Gmail or Google Apps?
How do I sort my email using Gmail or Google Apps to show emails which have attachments first?
The answer to sorting your email using Gmail or Google Apps is pretty simple if you know a few tricks. For example to display emails which have not yet been read, simply click into your search field and type: is:unread
(Click on image for full size)
This will display all unread emails. Let’s assume that you’ve created a Label called New Customers and you want to display all unread emails which have that label assigned. If that were the case you simply search for: label:new-customers is:unread
Get the idea? In fact Google gives Gmail and Google Apps users a variety of ways to sort and to find emails. Below is a graph of some of the Advanced Search Options available to you. Try them and let us know which ones you find most valuable to you.
You can also use some of the advanced search operators by clicking on “Show search options” next you your “Search The Web” button.
Now would be a great time to Bookmark or Add this page to your favorites within your browser!
| Operator | Definition | Example(s) |
|---|---|---|
| from: | Used to specify the sender | Example: from:amy Meaning: Messages from Amy |
| to: | Used to specify a recipient | Example: to:david Meaning: All messages that were sent to David (by you or someone else) |
| subject: | Search for words in the subject line | Example: subject:dinner Meaning: Messages that have the word “dinner” in the subject |
| OR | Search for messages matching term A or term B* *OR must be in all caps |
Example: from:amy OR from:david Meaning: Messages from Amy or from David |
| - (hyphen) |
Used to exclude messages from your search | Example: dinner -movie Meaning: Messages that contain the word “dinner” but do not contain the word “movie” |
| label: | Search for messages by label* *There isn’t a search operator for unlabeled messages |
Example: from:amy label:friends Meaning: Messages from Amy that have the label “friends”Example: from:david label:my-family Meaning: Messages from David that have the label “My Family” |
| has:attachment | Search for messages with an attachment | Example: from:david has:attachment Meaning: Messages from David that have an attachment |
| list: | Search for messages on mailing lists | Example: list:info@example.com Meaning: Messages with the words info@example.com in the headers, sent to or from this list |
| filename: | Search for an attachment by name or type | Example: filename:physicshomework.txt Meaning: Messages with an attachment named “physicshomework.txt” Example: label:work filename:pdf |
| ” ” (quotes) |
Used to search for an exact phrase* *Capitalization isn’t taken into consideration |
Example: “i’m feeling lucky” Meaning: Messages containing the phrase “i’m feeling lucky” or “I’m feeling lucky” Example: subject:”dinner and a movie” |
| ( ) | Used to group words Used to specify terms that shouldn’t be excluded |
Example: from:amy (dinner OR movie) Meaning: Messages from Amy that contain either the word “dinner” or the word “movie” Example: subject:(dinner movie) |
| in:anywhere | Search for messages anywhere in Gmail* *Messages in Spam and Trash are excluded from searches by default |
Example: in:anywhere movie Meaning: Messages in All Mail, Spam, and Trash that contain the word “movie” |
| in:inbox in:trash in:spam |
Search for messages in Inbox, Trash, or Spam | Example: in:trash from:amy Meaning: Messages from Amy that are in Trash |
| is:important label:important |
Search within messages that Priority Inbox considers important. | Example: is:important from:janet Meaning: Messages from Janet that were marked as important by Priority Inbox |
| is:starred is:unread is:read |
Search for messages that are starred, unread or read | Example: is:read is:starred from:David Meaning: Messages from David that have been read and are marked with a star |
| cc: bcc: |
Used to specify recipients in the cc: or bcc: fields* *Search on bcc: cannot retrieve messages on which you were blind carbon copied |
Example: cc:david Meaning: Messages that were cc-ed to David |
| after: before: |
Search for messages sent during a certain period of time* *Dates must be in yyyy/mm/dd format. |
Example: after:2004/04/16 before:2004/04/18 Meaning: Messages sent between April 16, 2004 and April 18, 2004.* *More precisely: Messages sent after 12:00 AM (or 00:00) April 16, 2004 and before April 18, 2004. |
| is:chat | Search for chat messages | Example: is:chat monkey Meaning: Any chat message including the word “monkey”. |
| deliveredto: | Search for messages within a particular email address in the Delivered-To line of the message header | Example: deliveredto:username@gmail.com Meaning: Any message with username@gmail.com in the Delivered-To: field of the message header (which can help you find messages forwarded from another account or ones sent to an alias). |
Have fun and let us know which of these operators or commands you like best!



I’ve always wondered how to search for unread emails. This list is fantastic – many thanks!!!
The question was how to sort, you replied how to search. Why do you stubbornly refuse to develop a sort function? Thanks.
Hi Chris,
Our apologies if you think we dodged the question of sorting but by using the many search features available to you, it actually makes sorting a moot point. While I agree it would be nice to have a pull down to sort by unread by date, or oldest first, I believe that the Google thought process is why sort when you can just find just as easily. Keep your feedback coming as Google is always listening to enhance their services. Thanks for the feedback.