'Gmail Filter Based on Contact Label
I have a bunch of contacts associated with a label in gmail. I would like to set up a filter to label or delete all messages not associated with those contacts in the label. Has anyone found a way to do this?
Example https://snipboard.io/wLvuZt.jpg
Solution 1:[1]
First create an email to the group (no need to send it) as described here, under "Use groups in Gmail". Then copy-paste the list of emails to create a filter for multiple emails in the format from:{email1, email2, ...}, as described here.
Here's the step-by-step procedure:
- In gmail Compose a new message
- In the To: field type the name of the Group (aka the label)
- Press Tab - this will expand the list of recipients
- Press Ctrl-A to select all recipients (or click the first recipient to select it, then Shift-click the last recipient to select all recipients)
- Copy the recipients with Ctrl-C
- In the Search mail field enter
-from:{LIST}, whereLISTis the list of emails you copied (you can paste it with Ctrl-V)
The - is because you asked for "all messages not associated with those contacts in the label".
The {...} is an "OR" operator.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
