On Fri, 3 Mar 2006, Brad Goldsmith wrote:
I have a project requirement that needs to be able to parse a multipart mime message to be able to pick out the attachments, process them and them put them back again.
Would c-client fit the bill for this kind of job?

I don't know what you mean by "process them and the[n?] put them back together again".

c-client is certainly capable of parsing an arbitrarily complex multipart MIME message and return a tree-structured representation of the MIME structure. Having that tree structure, you can calculate IMAP-style body part specifier; and a different c-client function can retrieve the desired part from the overall message. mtest demonstrates how you calculate the body part specifier from the tree structure.

c-client is not the most complex API out there; in fact it is a gem of simplicity compared to OpenSSL, GSSAPI, or any Microsoft API. Nevertheless, it isn't trivial either.

My entire purpose for writing c-client was that I process email, including MIME, in multiple programs; and I really didn't want to write the same code to do the same tasks over and over again.

-- 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]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to