The simple answer is that you place the message into a mailbox (using mail_append()), do mail_open(), and then use the various mail_fetch*() functions.

The slightly more complex answer is that if you really want a string or a file that isn't a mailbox, you should write a simple driver that opens a single-message mailbox from a file or a string.

Direct calls to rfc822_parse_msg() are NOT advisable. Not even drivers make direct calls to the parsing routines any more. The mail_*() abstraction exists for a reason; they provide a safe and supported interface that won't change in the future in subtle ways that will break your application.

It is also FAR more simple to do as I suggest than to call the parsing routines directly. If you're still determined, then look at how mail_fetch_structure() works in mail.c to learn the needed secrets. And be aware that this may change in the future, and thus you'll have to re-do the exercise each time a new version of c-client comes out.

Good luck....

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to