[dev] Question with Horde_Imap_Client_Base::fetch() when UID no longer exists.
Michael J Rubinsky
mrubinsk at horde.org
Sat Jan 19 22:15:48 UTC 2013
What is the expected behavior when attempting to fetch a UID that no
longer exists on the server? I would have thought - and I am almost
positive that this is the way it worked when I first coded the AS
email code, that there would be no data returned. 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();
$ids = new Horde_Imap_Client_Ids(array(160571));
$results = $imap_ob->fetch($mbox, $query, array('ids' => $ids));
</code>
Previously, $results[160571] was empty if it didn't exist on the
server, now it seems to contain an Horde_Imap_Client_Data_Fetch object:
var_dump($results[160571]->getStructure()->contentTypeMap());
Results:
array(1) {
[""]=>
string(24) "application/octet-stream"
}
What is the current/correct way of catching when the requested email
no longer exists on the IMAP server?
--
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/f085ba45/attachment.bin>
More information about the dev
mailing list