Re: imap4 search criteria
| From: | Dominik Gehl | Date: | Fri, 12 Feb 2010 15:55:48 +0000 |
| Subject: | Re: imap4 search criteria | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-46982@lists.php.net to get a copy of this message | ||
Hi,
thanks for the feedback ! Let me know if you have other ideas ... I'm really open to make
changes to the patch !
Thanks again,
Dominik
On 2010-02-12, at 10:47 AM, Pierre Joye wrote:
> hi,
>
> There is but I'm not sure these new functions are the way to go. Also
> we have been busy with releases lately, just in case you don't follow
> the lists too closely, be patient :)
>
> Cheers,
>
> On Fri, Feb 12, 2010 at 3:02 PM, Dominik Gehl <dominik@dokdok.com> wrote:
>> Hi,
>>
>> I was just wondering if there was any interest to get this enhancement into the PHP IMAP
>> extension. Should I re-sent the patch as an attachment ?
>>
>> Thanks
>> Dominik
>>
>> On 2010-02-04, at 7:01 PM, Dominik Gehl wrote:
>>
>>>>> $pgm = imap_searchprogram_new();
>>>>> imap_searchprogram_criteria($pgm1,"DRAFT SMALLER 34567 HEADER Message-Id
>>>>> <D76C58CD-C94D-4DE4-B621-83D66437EFE3@dokdok.com> FROM dominik@dokdok.com");
>>>>
>>>> I assume you meant '$pgm' above?
>>>
>>> You are absolutely right !
>>>
>>> In fact, you can also set every parameter in its own imap_searchprogram_criteria call,
>>> so the above (without the typo) would be equivalent to the four calls below:
>>>
>>> imap_searchprogram_criteria($pgm,"DRAFT");
>>> imap_searchprogram_criteria($pgm,"SMALLER 34567");
>>> imap_searchprogram_criteria($pgm,"HEADER Message-Id
>>> <D76C58CD-C94D-4DE4-B621-83D66437EFE3@dokdok.com>");
>>> imap_searchprogram_criteria($pgm,"FROM dominik@dokdok.com");
>>>
>>> If you need a logical OR of several criteria, you would use the following calls:
>>>
>>> $pgm1 = imap_searchprogram_new();
>>> imap_searchprogram_criteria($pgm1,"DRAFT");
>>> $pgm2 = imap_searchprogram_new();
>>> imap_searchprogram_criteria($pgm2,"ANSWERED");
>>> $pgm = imap_searchprogram_or($pgm1, $pgm2);
>>> imap_search($mbox,$pgm);
>>>
>>>
>>> Dominik
>>
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net |
> http://www.libgd.org