Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46981 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2465 invoked from network); 12 Feb 2010 15:47:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Feb 2010 15:47:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.225 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.220.225 mail-fx0-f225.google.com Received: from [209.85.220.225] ([209.85.220.225:33485] helo=mail-fx0-f225.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/C0-29990-E18757B4 for ; Fri, 12 Feb 2010 10:47:43 -0500 Received: by fxm25 with SMTP id 25so601992fxm.12 for ; Fri, 12 Feb 2010 07:47:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=OXdKonQh629J9HVL9YTYrUG8AJvdgWajjWnDHz2qwOQ=; b=nxgHSEkNcBThDOz5ueVGemv6PPR1h1CEkzxeRCcPbjdmq/W76D2caCfzAvM17LAaOi upqy58cbQEt/PBwY0gFEOp483GAiLXlLX8Ngx4kPwVTEgEGpit0ttxV9erYF/27ZSpdE ivR3ZV1bimOWrT+mr2022tvqWCn77Su+iqQtA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=LRf49n7r8nMtsNPepIX8bUqfkkmcdFfcREE53ZWyZxVkbfvRwwpG8a/fGvxRXpQEmm ZBduYFvTObV/r9m4QvLDnMwlh3PANkhEWZ9RwFfZwFJODBCefqBBpAjLA01NA4K/IFJT eUIHx7VG5HaqoQiSYlXnOAqM8Ysg2hKSaW1ZQ= MIME-Version: 1.0 Received: by 10.216.88.143 with SMTP id a15mr899012wef.206.1265989658157; Fri, 12 Feb 2010 07:47:38 -0800 (PST) In-Reply-To: <693CEE14-69C4-4D09-82C1-8A221E3A02E4@dokdok.com> References: <9862FA74-6B36-4C0E-AA15-6A5E17273C24@dokdok.com> <20100204220251.GA9900@joeysmith.com> <693CEE14-69C4-4D09-82C1-8A221E3A02E4@dokdok.com> Date: Fri, 12 Feb 2010 16:47:38 +0100 Message-ID: To: Dominik Gehl Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] imap4 search criteria From: pierre.php@gmail.com (Pierre Joye) 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 wrote: > Hi, > > I was just wondering if there was any interest to get this enhancement in= to 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 =3D imap_searchprogram_new(); >>>> imap_searchprogram_criteria($pgm1,"DRAFT SMALLER 34567 HEADER Message-= Id FROM dominik@dokdok.co= m"); >>> >>> 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 f= our calls below: >> >> imap_searchprogram_criteria($pgm,"DRAFT"); >> imap_searchprogram_criteria($pgm,"SMALLER 34567"); >> imap_searchprogram_criteria($pgm,"HEADER =A0Message-Id "); >> imap_searchprogram_criteria($pgm,"FROM dominik@dokdok.com"); >> >> If you need a logical OR of several criteria, you would use the followin= g 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 > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org