Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46982 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4141 invoked from network); 12 Feb 2010 15:55:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Feb 2010 15:55:55 -0000 Authentication-Results: pb1.pair.com header.from=dominik@dokdok.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dominik@dokdok.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain dokdok.com from 74.125.92.27 cause and error) X-PHP-List-Original-Sender: dominik@dokdok.com X-Host-Fingerprint: 74.125.92.27 qw-out-2122.google.com Received: from [74.125.92.27] ([74.125.92.27:46176] helo=qw-out-2122.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/21-29990-90A757B4 for ; Fri, 12 Feb 2010 10:55:54 -0500 Received: by qw-out-2122.google.com with SMTP id 8so131236qwh.59 for ; Fri, 12 Feb 2010 07:55:51 -0800 (PST) Received: by 10.224.58.196 with SMTP id i4mr796850qah.94.1265990150965; Fri, 12 Feb 2010 07:55:50 -0800 (PST) Received: from ?172.16.10.132? ([38.108.74.28]) by mx.google.com with ESMTPS id 4sm7348290qwe.13.2010.02.12.07.55.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 12 Feb 2010 07:55:49 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1077) In-Reply-To: Date: Fri, 12 Feb 2010 10:55:48 -0500 Content-Transfer-Encoding: quoted-printable Message-ID: <44336FA6-7FA4-4EE5-8874-F184C6041E30@dokdok.com> References: <9862FA74-6B36-4C0E-AA15-6A5E17273C24@dokdok.com> <20100204220251.GA9900@joeysmith.com> <693CEE14-69C4-4D09-82C1-8A221E3A02E4@dokdok.com> To: internals@lists.php.net X-Mailer: Apple Mail (2.1077) Subject: Re: [PHP-DEV] imap4 search criteria From: dominik@dokdok.com (Dominik Gehl) 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, >=20 > 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 :) >=20 > Cheers, >=20 > On Fri, Feb 12, 2010 at 3:02 PM, Dominik Gehl = wrote: >> Hi, >>=20 >> 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 ? >>=20 >> Thanks >> Dominik >>=20 >> On 2010-02-04, at 7:01 PM, Dominik Gehl wrote: >>=20 >>>>> $pgm =3D imap_searchprogram_new(); >>>>> imap_searchprogram_criteria($pgm1,"DRAFT SMALLER 34567 HEADER = Message-Id FROM = dominik@dokdok.com"); >>>>=20 >>>> I assume you meant '$pgm' above? >>>=20 >>> You are absolutely right ! >>>=20 >>> 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: >>>=20 >>> imap_searchprogram_criteria($pgm,"DRAFT"); >>> imap_searchprogram_criteria($pgm,"SMALLER 34567"); >>> imap_searchprogram_criteria($pgm,"HEADER Message-Id = "); >>> imap_searchprogram_criteria($pgm,"FROM dominik@dokdok.com"); >>>=20 >>> If you need a logical OR of several criteria, you would use the = following calls: >>>=20 >>> $pgm1 =3D imap_searchprogram_new(); >>> imap_searchprogram_criteria($pgm1,"DRAFT"); >>> $pgm2 =3D imap_searchprogram_new(); >>> imap_searchprogram_criteria($pgm2,"ANSWERED"); >>> $pgm =3D imap_searchprogram_or($pgm1, $pgm2); >>> imap_search($mbox,$pgm); >>>=20 >>>=20 >>> Dominik >>=20 >>=20 >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >>=20 >>=20 >=20 >=20 >=20 > --=20 > Pierre >=20 > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org