[dev] [Corrected] Horde_Imap_Client and fetching vanished messages.

Michael M Slusarz slusarz at horde.org
Tue Jan 10 18:12:46 UTC 2012


Quoting Michael J Rubinsky <mrubinsk at horde.org>:

> I'm trying to get a set of uids that have been expunged since a  
> specific modseq value.

[snip]

> Then, I "read" a single email in my INBOX do NOT change anything else:
>
> <code>
> $results = $imap->fetch(
>     $mbox,
>     $q,
>     array('changedsince' => 379323,
>           'vanished' => true)
> );
>
> var_dump($results);
> </code>
>
> <output>
> array(1) {
> [91203]=>
>   object(Horde_Imap_Client_Data_Fetch)#510 (1) {
>     ["_data":protected]=>
>     array(3) {
>       [14]=>
>       int(34)
>       [13]=>
>       int(91203)
>       [15]=>
>       int(379363)
>     }
>   }
> </output>
>
> Am I doing something wrong?

Looks like there is some errors in the Horde_Imap_Client code dealing  
with the 'vanished' parameter (namely, the fact that it is never used  
in Socket.php).  So that will need to be fixed.

That being said, the question becomes: why are you using  
changedsince/vanished at all?  Generally, you shouldn't need to use  
these parameters at all; they are used internally for caching purposes  
instead, the reason being that QRESYNC will not be available on many  
IMAP servers, so this code won't work at all unless you are doing some  
kind of branching operation.  This kind of abstraction should/is done  
in the Horde_Imap_Client code, not application code.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list