Client calculating BODY.size.bytes prior to uploading to the server

Chance <[email protected]>
Newsgroups gmane.mail.imap.uw.c-client
Message-ID <[email protected]>
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

_______________________________________________
Imap-uw mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.