Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > net/imap - imap.search "TO" can't find email

Reply
Thread Tools

net/imap - imap.search "TO" can't find email

 
 
jasonnaylor
Guest
Posts: n/a
 
      04-16-2008
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:

http://www.velocityreviews.com/forums/(E-Mail Removed)

A search function of:

imap.search(["TO", "(E-Mail Removed)"])

.... 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", "(E-Mail Removed)"])

.... 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=[#<struct Net::IMAP::Address name="(E-Mail Removed)",
route=nil, mailbox="080416w_test", host="this.dom.ain">]
<... snip...>
 
Reply With Quote
 
 
 
 
jasonnaylor
Guest
Posts: n/a
 
      04-16-2008
Interestingly, I can find the following (another entirely different
message):

irb(main):107:0> imap.search(["TO", "(E-Mail Removed)"])
=> [1174]

So it appears something about the "_" character in the mailbox of the
previous search might be the culprit:

`(E-Mail Removed)`
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 3 02-14-2011 05:28 AM
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 0 02-10-2011 05:18 PM
can find ImageButton but can't find button ad ASP .Net 2 11-20-2005 11:35 AM
Find.find does not find orphaned links? Wybo Dekker Ruby 1 11-15-2005 02:50 PM
Find::Find Dan Jones Perl 1 10-08-2004 09:14 AM



Advertisments