Hi Arnt,

--On Tuesday, March 4, 2003 4:12 PM +0100 Arnt Gulbrandsen <[EMAIL PROTECTED]> wrote:

|> That's what I meant with "fetching BODY", except I remembered BODY was
|> enough. But still, fetching BODYSTRUCTURE is pretty much useless
|> cpu/bandwidth usage just for one paperclip icon.
|
| Well, almost all clients need to fetch
| from/to/cc/content-type/content-transfer-encoding, and FETCH BODY is a
| reasonably efficient way to get all of that.

Not quite - you can fetch the ENVELOPE to get all the To/From etc data, but that won't tell you what the message structure is. In my case I also fetch BODYSTRUCTURE and then have a set of seven different icons that appear to indicate the nature of the content. That includes combinations of signed + attachment, signed + styled text, encrypted etc - I have to have the full BODYSTRUCTURE in order to do that. This does mean more bytes returned in each fetch used to populate the message list display, but its really not all that bad.

One alternative to this is to simply fetch the top-level Content-Type header via HEADER.FIELDS rather than BODYSTRUCTURE. That will give you a clue as to whether there is one or more parts, and that may be sufficient for some needs. Then you can fetch BODYSTRUCTURE only when the user actually goes to read the message if you then want to show the actual parts of the message in detail.


-- Cyrus Daboo

Reply via email to