From: jasonnaylor Date: 2008-04-16T12:50:19+09:00 Subject: net/imap - imap.search "TO" can't find email I'm having trouble with the "search" feature of Net::IMAP. I'm attempting to search for a message "TO" a particular recipient. The email recipient is something like: 080416w_test@this.dom.ain A search function of: imap.search(["TO", "080416w_test@this.dom.ain"]) ... simply returns nothing. By removing the mailbox details and only searching for the domain: imap.search(["TO", "@this.dom.ain"]) ... I return results. In fact, I can build the "TO" string as long as: imap.search(["TO", "_test@this.dom.ain"]) ... and results are returned. What don't I understand? Is it my limited knowledge of Ruby, or the imap.search I'm not understanding??? Note: Here's the fetch "ENVELOPE" of the mail I'm after: irb(main):073:0* imap.fetch(1179, "ENVELOPE") <... snip...> , to=[#] <... snip...>