[dev] Question with Horde_Imap_Client_Base::fetch() when UID no longer exists.
Michael J Rubinsky
mrubinsk at horde.org
Sun Jan 20 00:57:01 UTC 2013
Quoting Michael M Slusarz <slusarz at horde.org>:
> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>
>> 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.;
>
> It is quite possible isDefault() may not work as expected in your
> use case (cached results from fetch()), since we are always storing
> UID/sequence numbers when we create.
>
> Either use SEARCH to check for existence of the message, or
> explicitly check for the existence of a given fetch return field
> that MUST be present (e.g. if a server returns busted structure
> data, it doesn't matter whether the message exists or not because
> you still won't be able to display the message) using
> Horde_Imap_Client_Data_Fetch::exists().
Yeah. This happens when the client requests an attachment for a
message still on the device. I need to catch the case when the message
is vanished on the server. I guess I'll just check for the existence
of the appropriate MIME part for the requested attachment now that I
know I should always be able to obtain the contentTypeMap.
Thanks for the input.
--
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/803e56e6/attachment-0001.bin>
More information about the dev
mailing list