[dev] [Corrected] Horde_Imap_Client and fetching vanished messages.
Michael J Rubinsky
mrubinsk at horde.org
Fri Jan 6 17:41:11 UTC 2012
Sigh, seems like the periods I used to indicate other results in the
array output confused the MTA. One more try:
The Horde_Imap_Client experience continues:
I'm trying to get a set of uids that have been expunged since a
specific modseq value.
<code>
// First show the existing state of the INBOX
$imap = $registry->mail->imapOb();
$mbox = new Horde_Imap_Client_Mailbox('INBOX');
$q = new Horde_Imap_Client_Fetch_Query();
$results = $imap->fetch(
$mbox,
$q
);
// Output some stats to verify values of these are correct
var_dump($imap->status($mbox,
Horde_Imap_Client::STATUS_HIGHESTMODSEQ |
Horde_Imap_Client::STATUS_UIDVALIDITY |
Horde_Imap_Client::STATUS_UIDNEXT));
var_dump($results);
</code>
<output>
array(3) {
["uidnext"]=>
string(5) "91203"
["uidvalidity"]=>
string(10) "1292457115"
["highestmodseq"]=>
string(6) "379323"
}
array(35) {
<snip>
[91203]=>
object(Horde_Imap_Client_Data_Fetch)#510 (1) {
["_data":protected]=>
array(2) {
[14]=>
int(34)
[13]=>
int(91203)
}
}
<snip>
}
</output>
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?
Thanks!
More information about the dev
mailing list