Join 3,427 readers in helping fund MetaFilter (Hide)


How do I filter out e-mails with an empty To: fields in Gmail?
July 17, 2012 9:14 AM   Subscribe

How do I filter out e-mails with an empty To: fields in Gmail?

I basically want to filter out e-mails that I receive but have an empty "To:" field in gmail (and from specific e-mail addresses) but I can't figure out how to specify it with Gmail's filtering search criteria boxes. You've probably seen these e-mails as To:undisclosed recipients, but when you look at the details it is because the To: field is blank. I'm quite familiar with creating gmail filters, but I just can't figure out what to put in the search box to make gmail look for To: fields with 'nothing' in them and every tutorial I've found online is about how to send e-mail like this, not filter out ones you receive. I've tried leaving all the search fields blank which finds all my e-mails, tried empty quotes and parenthesis, ie "" or () but it still returns all e-mails, and I've tried typing in "undisclosed recipients" but it didn't find these e-mails (unless those words were actually written in the To: field). Is it even possible to search for blank To: fields?
posted by mxmm to Computers & Internet (5 answers total) 2 users marked this as a favorite
 
From this site, it looks like you could try:

deliveredto:myemail@gmail.com AND -to:myemail@gmail.com AND -cc:myemail@gmail.com
posted by BurntHombre at 9:19 AM on July 17, 2012 [1 favorite]


Ah nice! Never would have guessed that. Actually, I think I might have seen the deliveredto: criteria but I tried putting that in the To: box. You need to either type it in the general search box (which I did this time) or put it in the Has The Words: box if you are in the advanced search mode.

Thanks!
posted by mxmm at 9:47 AM on July 17, 2012


That will also filter out anything that is bcc'd to you, even if it has a To: field.
posted by grouse at 10:38 AM on July 17, 2012


Something along the lines of
-to:(com|org|net|biz|info|us|me|edu|gov|uk|ca)
kind of works. You'd want to be careful to make sure that you weren't being bcc'd on mail to addresses in other TLDs, though.
posted by hades at 5:00 PM on July 17, 2012


Here's a somewhat more complete version of that. It's an ugly hack, but might be enough for your purposes.

-to:(ac|ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|as|asia|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cat|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|info|int|io|iq|ir|is|it|je|jm|jo|jobs|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mo|mobi|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|travel|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xxx|ye|yt|yu|za|zm|zw)

Apologies for the super-long line. I just tested it in my own account, and it did seem to match all the messages with an empty or missing To: header. Or, rather, all the messages it matched had an empty or missing To: header. I don't have a way to check whether it found all of the messages like that, because if I did, I could just tell you how to do that, instead.
posted by hades at 5:14 PM on July 17, 2012 [1 favorite]


« Older According to this story in the...   |  My small business is redoing i... Newer »
This thread is closed to new comments.