Keep in mind that in this chapter, I’m focusing entirely on using Gmail in a web browser. In the next chapter, I’ll look at accessing Gmail using a desktop email client such as Outlook, Apple Mail, or Thunderbird. With that in mind, let’s look at five things you absolutely need to know about Gmail to use it more effectively.
Searching for the Exact Message You Need
Gmail is a product of Google, after all, so it’s no shocker that it has excellent search capabilities. Unfortunately, many Google Search users just type a word or two into the search box and get good results, when they could get great results if they knew some advanced search operators. A similar situation exists with Gmail—most users simply search for a word or two, and they probably get good results, but if they learned a few advanced search operators, they could get great results.
So what’s a search operator? Basically, it’s just a word or symbol that modifies your search queries. There are oodles of search operators. Some of them are in your email headers, as shown in Table 8.1.
Tip - Here are two ways in which Google Search and Gmail’s search are different. If you search Google and misspell a word, Google will suggest a correct spelling; Gmail, however, does not do so. Additionally, if you search Google for a word, Google will find that word and related plurals (searching for “dog” also brings up results with “dogs,” for instance); again, Gmail does not do so.
Table 8.1 Search Operators for Email Headers
Search Operator | Meaning | Examples |
to: | Messages sent to you or someone else |
|
cc: | Messages CC’d to you or someone else |
|
bcc: |
| bcc:jans@websanity.com |
subject: | Words in the Subject |
|
from: | Messages sent to you by someone else |
|
Other search operators are based on searching for attachments, or even the types of files that make up the attachments. Table 8.2 shows some of those search operators.
Other filenames you can search for include (this is by no means an exhaustive list):
Movies—avi, mov, mp4, mpg, wmv
Sound—wav, wmv
Images—bmp, gif, jpg, png, tiff
Documents—csv, odt, ppt, rtf, txt, xls
Table 8.2 Search Operators for Attachments
Search Operator | Meaning |
has:attachment | Messages that have attachments |
filename:pdf | Messages with PDF attachments |
filename:doc | Messages with Word attachments |
filename:mp3 | Messages with MP3 attachmentsd |
Google relies heavily on labels (which we’ll look at in the next section), and you can use search operators that target specific labels, as demonstrated in Table 8.3.
Table 8.3 Search Operators for Labels
Search Operator | Shortcut | Shortercut | Shortestcut | Meaning |
label:inbox | in:inbox is:inbox | l:inbox | l:^I | Messages in the Inbox |
label:starred | in:starred is:starred | l:starred | l:^t | Starred messages |
label:chats | in:chat is:chat | l:chats | l:^b | Archived chatsc |
label:sent | in:sent is:sent | l:sent | l:^f | Sent messages |
label:drafts | in:drafts is:drafts | l:drafts | l:^r | Draft messages |
label:spam | in:spam is:spam | l:spam | l:^s | Junk messages |
label:trash | in:trash is:trash | l:trash | l:^k | Messages in the Trash |
label:unread | in:unread is:unread | l:unread | l:^u | Unread messages |
label:read | in:read is:read | l:read | Read messages | |
label:anywhere | in:anywhere is:anywhere | l:anywhere | Anywhere in Gmail, including Spam and Trash (which are normally ignored) |
You can also search by time, as you can see in Table 8.4. However, dates must always be expressed in yyyy/mm/dd format.
Table 8.4 Search Operators for Time
Search Operator | Meaning | Examples |
after: | After, but not including, the specified date | after:2008/12/17 |
before: | Before, but not including, the specified date | before:2008/12/17a |
Things get really interesting, however, when you learn to construct more complex queries. Let’s start with Boolean search terms and the various symbols you can use to build powerful queries, as displayed in Table 8.5.
Table 8.5 Boolean Search Terms and Symbols You Can Use to Devise Complex Queries
Search Operator | Symbol Equivalent | Examples | Notes |
AND | [space] | Jans AND CartonJans Carton | Word must be in all caps; AND is the default because spaces are its symbol. |
OR | | | Jans OR CartonJans | Carton | Word must be in all caps. |
NOT | – | Jans NOT CartonJans –Carton | Word must be in all caps; no space after the hyphen. |
“” | “Gmail address book”subject: “Saint Louis Zoo” | Search for exact phrase; capitalization ignored. | |
() | subject:(Zoo PRSA)from:(Jans | Jerry) | Groups different terms together. | |
{} | {from:jerry from:jans} | Group ORs together. |
Now that you know all the information contained in the previous tables, let’s combine the various operators in Table 8.6 for some complex queries.
Table 8.6 Some Complex Queries and Their Meanings
Search Query | Meaning |
to:me l:^u in:inbox OR to:me l:(unread inbox) | Messages in the Inbox to me that are unread. |
from:jans subject:(zoo | prsa) | Messages from Jans with a subject of zoo or prsa. |
l:unread from:jans after:2008/06/10 | Unread messages from Jans sent after 6/10/2008. |
from:jans filename:pdf -subject:zoo | Messages from Jans with PDF attachments that do not have zoo in the subject. |
in:chat from:jans flickr | Chats with Jans in which Flickr is discussed. |
l:^k from:jans before:2008/06/10 subject:zoo | Messages from Jans sent before 6/10/2008 with zoo in the subject, but now in the trash. |
subject:zoo in:anywhere | A message with zoo in the subject that could be anywhere, including Trash and Spam. |
filename:{mov wmv pdf tiff} before:2006/01/01 | Look for any old messages with any of several kinds of large attachments, so I can delete them to free up space. |
-label:inbox OR -l:^I | Messages not in the Inbox. |
Really, the best way to learn about searching Gmail is to practice and record the ones that work for you the best. If you use the Quick Links features from Gmail Labs (discussed in Chapter 7’s “Quick Links” section), you can save those searches and easily return to them later.
In fact, if you often search for a particular label, you can use your browser’s bookmarks to quickly return to it later. For instance, if I created a label named “Todo” and I wanted to quickly see all the messages to which I’ve given that label, I can just bookmark https://mail.google.com/a/heavymetalmassage.com/#label/todo (of course, change the domain name and label to fit your particular case).
Living with Labels
I discussed labels in Chapter 7’s “Labels” section, but I want to emphasize here just how important they are to Gmail. There are no folders in Gmail. None. Instead, Gmail uses labels to organize email, which are far better and more useful than folders. Why?
Suppose you receive an email from your coworker Bob about the Zoo project you’re doing in cooperation with the Yog-Sothoth firm. You have four folders set up in your email program: Bob, Work, Zoo Project, Yog-Sothoth. Into which folder do you file the message? After you pick one, that’s it—even though the email has to do with all four subjects, it can go into only one folder. If you want to find it in the future, you either have to remember which folder it’s in, or click one at a time on each folder, or search. The first requires a superhuman memory if you get a ton of mail, the second is silly, and the third can be dog slow on desktop clients.
If you use Gmail, you can assign as many labels as you’d like to a message. In the example in the previous paragraph, you could assign Bob, Work, Zoo Project, and Yog-Sothoth to the message. If you wanted to find it later, you could click any of those four labels, or search—and searching Gmail is fast. If you learn the search operators I just covered in the previous section, it’s even more efficient.
So learn to live with labels. They can be tremendously helpful. But, as I’ve discussed before (in Chapter 3’s “Molding Your Email Folder Structure into the One Used by Gmail” section), don’t go label crazy. With Gmail’s powerful and fast search, you may find that the fewer labels you use, the better. Before adding a label, first ask yourself if you absolutely need it. And don’t be afraid to remove labels down the road and consolidate. Instead of Work/PRSA, Work/Science Center, and Work/Zoo, just create a label titled Work and dump everything in there. After that, search becomes your friend. Try it—you may love it.
Filtering Messages Effectively
Filters were discussed in Chapter 7’s “Filters” section, where they were explained as the automated tasks that Gmail performs on your email before you ever see it. For instance, if you’re sick of stupid joke emails from your Uncle Gussie, you could set up a filter that sends any email that is from Gussie, and also has “joke” or “humor” in the subject, to the Trash so you’ll never even have to see it.
The “Filters” section of Chapter 7 focused on setting up filters. In this section, I’d like to talk about some uses for filters. To begin with, let’s understand what aspects of an email are filterable. You can search for the following criteria and then use them to create your filters:
From—Can be a full name (Jans Carton), part of a name (Jans), an email address (jans@websanity.com), part of an email address (websanity.com), or “me.”
To—Can be a full name (Jans Carton), part of a name (Jans), an email address (jans@websanity.com), part of an email address (websanity.com), or “me.”
Subject—You can search for an exact phrase by using quotation marks (“blogs to wikis”).
Has the Words—You can search for an exact phrase by using quotation marks (“blogs to wikis”).
Doesn’t Have—You can search for an exact phrase by using quotation marks (“blogs to wikis”).
Has Attachment—A check box you can toggle.
To make sure your search criteria are correct, click Test Search and review the results. If they’re what you want, click Next Step. On the next screen you choose the actions you’d like to perform on messages that match your criteria. Those actions are the following, any of which you can check:
Skip the Inbox (Archive It)—You won’t see it in your Inbox; instead, it goes into All Mail. This is a good box to check along with others in this list.
Mark as Read—If you check this along with Skip the Inbox, it’s archived and won’t stick out, because it won’t be bold or listed as unread.
Star It—If it’s important or needs action, star it!
Apply the Label—Choose an existing label or create a new one. This action, when combined with Skip the Inbox, is equivalent to automatically filtering into folders with other email programs. A very common two-fer.
Forward It To—Enter an email address to which you’d like the message to go; don’t forget that you can create email lists so that you can enter one address that sends it to several people (covered in Chapter 6’s “Email Addresses” section).
Delete It—For the worst offenders.
Never Send It to Spam—This makes sure that the important email from your significant other or boss never gets accidentally dumped into Spam by a mistake in Gmail’s antispam technology.
After making your choices, click Create Filter to do just that. Next to that button is a check box labeled Also Apply Filter to # Conversations Below, where # is the number of conversations that match your filter’s search criteria. Most of the time you’re going to want to check that box because it will apply your filter’s actions to email that has already arrived, thus making sure that your mail is nicely organized.
With the filter process in mind, here are a few of my favorite filters. What’s shown in Table 8.7 is there to give you ideas, but you can search Google for others. And, of course, the best way to find a filter that works for you is to experiment.
Table 8.7 Some of My Favorite Gmail Filters
Filter Criteria | Filter Action | Meaning |
From: me To: me | Apply the label: Me | Easy to find emails I’ve sent myself as reminders. |
From: scott@websanity.com | Apply the Label: WebSanity | Emails I’ve sent from my work address. |
Has the words: (“serial number” OR “product key” OR “activation code” OR “license key” OR regsoft | Skip the Inbox (Archive It) Apply the Label: Serial Numbers | Serial numbers for software I’ve bought (thanks to Micah Diamond, who wrote in to Lifehacker). |
Has the words: (‚ OR Ë OR Ü OR à OR ?) | Skip the Inbox (Archive It) Delete It | I don’t speak Russian or Hebrew, so this is spam (that ‚ isn’t a capital B, it’s a Russian veh). |
Has the words: filename:jpg {photo photos pic pics picture pictures attachment attached} | Apply the Label: Pictures | Finds messages with photo attachments (you can do the same kind of thing for movies, documents, and music). |
to:(stlwebdev.org OR to:wwwac.org OR from:userland.com) | Skip the Inbox Apply the Label: LIST/WebDev | Note that you can combine to: and from: in your filter. from:(System Administrator) |
subject:(“log sizes” OR subject:“disk usage report”) | Skip the Inbox Apply the Label: WS/Reports | Look for messages with a certain From and certain phrases in the Subject. |
One final note about filters: after you’ve created one, you may want to add on to it later. For instance, suppose you create a filter that takes any mail from truthout.org, eff.org, or maal.org and labels it LIST/Politics. If you view your list of filters (by going to Settings, Filters, or by clicking Create a Filter and then Show Current Filters), you’ll see that it looks like this:
Matches: from:(truthout.org OR from:eff.org)Do this: Skip Inbox, Apply label “LIST/Politics”
If you want to add another from:—this one for moabolition.org—you would click Edit and change it to this:
Matches: from:(truthout.org OR from:eff.org OR from:moabolition.org)Do this: Skip Inbox, Apply label “LIST/Politics”