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?

  • 1
    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, 2012 at 12:29
  • 1
    I couldn't find an exact answer for this but what worked for me was using double quotes to cause the AND operator functionality. So with reference to OP's from:"address1@gmail.com" NOT from:address2@gmail.com should behave like AND
    – Anupam
    Jul 6, 2021 at 6:34

5 Answers 5


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.

  • 1
    And the AND operator? Does just adding 2 restrictions make it an AND by default? Sep 24, 2012 at 12:15
  • 7
    AND is the default.
    – Asahiko
    Aug 14, 2013 at 14:42
  • 6
    I have the feeling that the default is OR, because I got results from both words not together
    – logoff
    Oct 11, 2016 at 8:25
  • 5
    The robustness is pretty awesome actually, and you can negate whole subexpressions; I frequently search unread email not from a list of senders: is:unread -{ from:a from:b ... }
    – Dan Lugg
    May 1, 2017 at 15:05
  • 1
    Note that you need to use double quotes " when specifying exact phrases. I got weird results using single quotes '.
    – Tim Malone
    Jun 28, 2017 at 0:17

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

For not in Google, use -, like so:

from:addres1@gmail.com -address2@gmail.com
  • 3
    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, 2012 at 18:36
  • 1
    @TylerRick I have the exact same problem than the one you described here. Any idea since 2012? ;)
    – Basj
    May 2, 2020 at 17:48

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.

  • 1
    This is exactly what I was looking for and works great! I'm not sure why someone downvoted you.
    – Hexxagonal
    Dec 9, 2015 at 16:01

when trying to avoid multiple phrases in a subject line for selection:

-("phrase one" OR "phrase two" OR "word1")
  • 1
    This is the best answer. You can combine with brackets like this: -from:(gmail.com OR google.com) This will filter all emails from anybody at gmail.com or google.com
    – user643011
    Jul 4, 2018 at 12:52
  • 5
    Is this equivalent to -{"phrase one" "phrase two" "word1"}? Jan 22, 2019 at 18:38
  • 1
    @MarcelWilson it is not the same, having the OR in between the words is required logic.
    – Peter W
    Feb 5, 2019 at 15:10
  • 1
    I'm confused then. My understanding of the curly braces is all items contained within are OR'ed. While the parenthesis is a grouping, which if all items are OR'ed would mean they would be equivalent? Am I being dense? Feb 5, 2019 at 15:15
  • 7
    @MarcelWilson I spoke too soon - you are correct, I wasn't paying attention to the curly braces. According to the documentation curly braces replace the need for OR inside of parentheses.
    – Peter W
    Feb 5, 2019 at 16:46

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