body->size.bytes is the size of the first MIME body part, or the size of
the entire message body for a single-part or non-MIME message.
The way that this is calculated by the server is by parsing the message.
If you are uploading a message from the client, you are sending the
message as a text string, and thus you must parse it yourself.
The c-client library has routines that will do this.
On Wed, 23 Dec 2009, Chance wrote:
How can a client determine BODY.size.bytes prior to uploading the
message to the server? We are attempting to write a client such that the
client will know the size of BODY (in bytes) as it will appear on the
server. Once the message has been uploaded to the server, determining
the size is simple, i.e.:
BODY * body;
mail_fetchstructure(stream, msgno, &body)
printf("%u", body->size.bytes);
However, we have not been able to find any one value or combination of
values the client has access to locally that will equal size.bytes, as
demonstrated in the above code. How does the server determine the size
of the body? Is there any way a client can calculate that value locally,
so that the size on the server will be known before actually uploading
to the server?
Thanks
-- Mark --
http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
_______________________________________________
Imap-uw mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw