Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46946 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63319 invoked from network); 5 Feb 2010 00:01:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2010 00:01:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=dominik@dokdok.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dominik@dokdok.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain dokdok.com from 74.125.92.24 cause and error) X-PHP-List-Original-Sender: dominik@dokdok.com X-Host-Fingerprint: 74.125.92.24 qw-out-2122.google.com Received: from [74.125.92.24] ([74.125.92.24:14093] helo=qw-out-2122.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 35/EF-22982-ECF5B6B4 for ; Thu, 04 Feb 2010 19:01:18 -0500 Received: by qw-out-2122.google.com with SMTP id 5so307066qwd.59 for ; Thu, 04 Feb 2010 16:01:15 -0800 (PST) Received: by 10.224.23.141 with SMTP id r13mr581849qab.334.1265328074812; Thu, 04 Feb 2010 16:01:14 -0800 (PST) Received: from ?192.168.1.101? (modemcable144.86-58-74.mc.videotron.ca [74.58.86.144]) by mx.google.com with ESMTPS id 23sm462824qyk.3.2010.02.04.16.01.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 04 Feb 2010 16:01:14 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii In-Reply-To: <20100204220251.GA9900@joeysmith.com> Date: Thu, 4 Feb 2010 19:01:12 -0500 Content-Transfer-Encoding: quoted-printable Message-ID: References: <20100130232224.GA18033@joeysmith.com> <75DD619F-181F-4299-B812-ADC963C78CE8@dokdok.com> <9862FA74-6B36-4C0E-AA15-6A5E17273C24@dokdok.com> <20100204220251.GA9900@joeysmith.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) >> $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? 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 = "); imap_searchprogram_criteria($pgm,"FROM dominik@dokdok.com"); If you need a logical OR of several criteria, you would use the = following calls: $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); Dominik=