Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to find mails that have one address in the recipients but another not in it.

I'm trying things like from:address1@gmail.com and not from:address2@gmail.com and from:(address1@gmail.com and not address2@gmail.com)

None of them work, and I can't find a good help page about boolean operators either.

Anyone has any idea?

share|improve this question
Actually, your search doesn’t make much sense—you can’t receive an email from more than one recipient, so form: someone but-not-from: someone else can’t really work. You are probably trying to search for emails that were sent only to a restricted group of recipients. – Alex Sep 24 '12 at 12:29
up vote 17 down vote accepted

The 'or' function in Gmail is represented by 'OR,' and the 'not' function is represented by a minus (-). You also can use quotes (" ") to specify an exact phrase.

From the Gmail help page on Boolean operators.

share|improve this answer
And the AND operator? Does just adding 2 restrictions make it an AND by default? – Steven Roose Sep 24 '12 at 12:15
AND is the default. – Asa Aug 14 '13 at 14:42

For not in Google, use -, like so:

from:addres1@gmail.com -address2@gmail.com
share|improve this answer
from:-address@example.com doesn't seem to work for me when there are multiple messages in the same "conversation". Since SOME of those messages were NOT from address@example.com, it consider it a match and moves the ENTIRE conversation, even though one of the messages WAS from address@example.com so I would like the entire conversation to stay in the inbox... It's really tricky when Gmail tries to group things into conversations based on message similarity of subject/body! I wish the REPLIES to these messages could show up in my inbox even though the ORIGINALS got archived... – Tyler Rick Dec 27 '12 at 18:36

Use the minus sign to make a negative rule. You can also string rules together by just leaving a space between separate rules.

For example:

from:name@company.com -from:name2@company.com

or you can do things like

is:unread -in:spam -in:trash
share|improve this answer

This will work:

from:@company1.com -address2@company1.com

This puts all messages from any sender at company1.com into a folder except those from the individual address2@compay1.com.

share|improve this answer
This is exactly what I was looking for and works great! I'm not sure why someone downvoted you. – Hexxagonal Dec 9 '15 at 16:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.