0

I am playing with different/complex filtering queries/string in Gmail.

I found this answer (to my own question):

after:1552896000 before:1552924800

And I was able to use it without any problems, i.e. I managed to filter e-mails with given dates.

Then I found this answer:

If email is from:semi-valuable-email-service.com AND contains:"Monday OR Wednesday OR Friday" THEN send it to trash

and got a bit lost.

Is this a real string to be pasted somewhere into Gmail (where?) or a pseudo-code to explain filter settings that need to be applied?

Where should I put queries as complex as above? When I try to create a rule to filter my emails, all that I see is a filter configuration box with some simple fields and no place to put a query directly.

Actually, I don't need queries as complex as above, but I'd like to merge two or more simple queries (as in the first example, if possible) to filter out e-mails sent in a given period of time for two or more days:

after:1502294400 before:1502352000 AND after:1552896000 before:1552924800

But I am getting no results, neither from first nor from the second day. Is this possible at all in Gmail?

1

Is this a real string to be pasted somewhere into Gmail (where?) or a pseudo-code to explain filter settings that need to be applied?

It's a real thing and you are supposed to use it (just a part of it) in the search bar:

from:semi-valuable-email-service.com AND contains:"Monday OR Wednesday OR Friday"

0

To list emails from two days you need to use OR instead of AND and endclose it with () like:

(after:1552698000 before:1552777200) OR (after:1551834000 before:1551913200)

This will list all emails from 16th and 6th March 2019 received between 1 AM and 11 PM

0

  • Thank you for a quick, sharp yet to-the-point answer. Just to clarify. Is there any limit for how long the query could be, so Gmail won't die on processing it? I have to go through like hundreds (600+) of days, each time looking for mails received in given period of time. Right now I am doing this manually. Can I "bind" with OR, the way you showed, like dozens or hundreds of such query parameters? – trejder Mar 22 at 15:45
  • limit is 1894 characters – user0 Mar 22 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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