Hey, so the recent article I did on extending your gmail search was very well received, so here’s another tip (that I’ve slightly souped up) for this article – I hope it useful for anyone who finds searching gmail by date a bit of a pain.
I try and get everything in my inbox out and dealt with within 24 hours. But when I come online in the morning I get distracted by the stuff at the top of my inbox and forget, so things that come in at 10am often catch my eye more easily than the stuff that comes in at 6am.
Writing a search for ‘inbox NOT including today’ is slightly counterintuitive and somewhat of a pain so I put together a custom redirect of my own that brings up the stuff from yesterday that I need to finish If I got to
That redirects a user to their inbox with a custom search string that searches gmail by date. The search shows only those emails that turned up before today. It’s parameterisable so
takes you back four days and
takes your back ten days (this has never been useful, I promise).
The string is left in the search bar
so If you wanted to play with it, you can add extra terms and see where you end up.
It’s been useful for me so I thought I’d share to see if it was interesting for anyone else.
Because it might help people make up their mind, or achieve something similar (or, more likely, point out were I went wrong) here’s the relevant php (although I’ve also changed it in response to this) :
1 2 3 4 5 6 7 8 9 10
; //--> </script>
….and here’s the relevant bit of the .htaccess file that lets the nice url redirection work.
RewriteRule ^back/([0-9]+) redirect.php [PT]