php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15238 imap_search() does not support search criteria SENTSINCE
Submitted: 2002-01-26 21:01 UTC Modified: 2002-10-25 14:15 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: oliver at samera dot com dot py Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 4.0.6 OS: RedHat Linux 7.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: oliver at samera dot com dot py
New email:
PHP Version: OS:

 

 [2002-01-26 21:01 UTC] oliver at samera dot com dot py
The funcion imap_search() return false if you use the keyword SENTSINCE or SENTBEFORE.

Example:
- this return false
imap_search($mbox, 'SENTSINCE 01-Jan-2001');
- this works
imap_search($mbox, 'SINCE 01-Jan-2001');

The keyword is supported by wu-imapd 2000c.
I try doing a 'telnet localhost imap' and entered the commands manually and the keyword works.
Also Netscape 6.2.1 us SENTSINCE and SENTBEFORE instead
of SINCE and BEFORE.

I tested this in RedHat 7.1 and 7.2 with PHP 4.0.4pl1 and PHP 4.0.6

Also, if you use the SENTSINCE keyword, nothig is sended to the imap server. I use tcpdump to debug. Only if you use SINCE, the query is sended to the imap server.

Chech RFC 2060 Section 6.4.4. :
http://www.isi.edu/in-notes/rfc2060.txt

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-26 23:05 UTC] oliver at samera dot com dot py
It seems that the problem is in:
php_imap.c line 3446 in the PHP_FUNCTION(imap_search).

Here is a call for mail_criteria() that does no support IMAP4 search queries. mail_criteria() only support IMAP2 queries and SENTSINCE and SENTBEFORE are only IMAP4 keywords.

I'm looking at washington.edu/imap for an example on how to use search in IMAP4.

Anyone know something about this?

Thanks

 [2002-01-28 15:34 UTC] oliver at samera dot com dot py
It seems that in:
ext/imap/php_imap.c line 2587 PHP_FUNCTION(imap_sort)
there is a call for IMAP4 search in the call to the
function: 
mail_sort()

 [2002-07-02 17:11 UTC] richard@php.net
The c-client library only supports a limited set of search words. See the imap_search() manual page or the c-client source for info.
 [2002-10-25 14:15 UTC] oliver at samera dot com dot py
Yes, you are right. The function:
  SEARCHPGM *mail_criteria (char *criteria);
only support IMAP2 search criterias, so I'm looking
for a new function thar supports IMAP4 search criterias.
Is strange, because the structure SEARCHPGM already has
a variable called:
  unsigned short sentsince;  sent since this date
and this structure is returned by mail_criteria()

Will try to find help on the c-client mailing list.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 02:01:30 2024 UTC