• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. Gmail > Gmail Search Syntax

6.2. Gmail Search Syntax

Gmail offers a rich search syntax for routing through your email message archive—as if you'd expect, or indeed stand for, any less.


from:

Digs through the headers of your email message archive in search of mail sent by someone matching the keyword that you provide.

from:rael@oreilly.com


to:

The yang to from:'s yin, to: finds all messages sent to someone matching a provided keyword. (Don't forget plus-addressing Hack #72.)

to:engineers@example.com
to:raelity+shopping@gmail.com


subject:

Matches messages with a particular subject.

subject:"meeting notes"


label:

Looks for messages with a particular label applied.

label:knitting


has:attachment

The has: syntax has only one possible value (at least at the time of this writing): attachment. has:attachment in a query returns only messages having one or more attachments.

has:attachment


filename:

Finds messages with an attachment filename matching a provided pattern. Used with just a file extension (e.g., pdf or txt), filename: turns up all messages with attachments of a particular type.

filename:meeting_notes.txt
filename:pdf


in:

Returns a list of messages in a particular collection (read: folder). Acceptable values for in: are inbox, trash, spam, and anywhere (trash and spam are not included in searches unless explicitly included using in:trash, in:spam, or in:anywhere). Oddly enough, sent isn't a usable value for in:.

in:inbox
in:anywhere


is:

Acceptable values for is: are starred, unread, and read, which return starred, unread, and read messages, respectively.

is:read


cc:

Finds messages carbon copied to particular recipients.

cc:tara@example.com


bcc:

Finds outgoing messages blind carbon copied to particular recipients. Note that bcc: won't work on any incoming mail since there's no way to tell who was on the bcc line.

bcc:tara@example.com


before:

Matches messages sent or received before a particular date, specified in yyyy/mm/dd format. Unfortunately, partial dates—year only or year and month—don't find anything at all.

before:2004/10/02


after:

Match messages sent or received on or after a particular date, specified in yyyy/mm/dd format.

after:2004/11/21


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint