[dev] Question with Horde_Imap_Client_Base::fetch() when UID no longer exists.

Michael J Rubinsky mrubinsk at horde.org
Sun Jan 20 00:24:27 UTC 2013


Quoting Michael M Slusarz <slusarz at horde.org>:

<snip>

>> What is the current/correct way of catching when the requested  
>> email no longer exists on the IMAP server?
>
> $results[160571]->isDefault() !== true

This is not working for me. E.g.;

<code>
$imap_ob = $registry->mail->imapOb();
$mbox = new Horde_Imap_Client_Mailbox('INBOX');
$query = new Horde_Imap_Client_Fetch_Query();
$query->structure();
$query->flags();

// UID 1 does NOT exist while 160441 DOES exist.
$ids = new Horde_Imap_Client_Ids(array(1, 160441));

$results = $imap_ob->fetch($mbox, $query, array('ids' => $ids));

var_dump($results[1]->isDefault());         // Outputs (bool)false
var_dump($results[160441]->isDefault());    // Also outputs (bool)false

</code>
-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6062 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/dev/attachments/20130119/9636146e/attachment-0001.bin>


More information about the dev mailing list