Subject: How to figure out how many parts in a message?

From: Shawn Walker <[email-masked]>
Date: 13 May 2002 12:04:00 -0500

How do I figure out how many parts there are in a message so that I can
get all the parts by calling mail_body(), mail_fetch_mime() and
mail_fetch_body().

Thanks,
Shawn

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Elvers <[email-masked]>
Date: Mon, 13 May 2002 18:23:21 +0100 (BST)

What I do is use a modified version of the display_body() function from
mtest/mtest.c.  Rather than the "puts(tmp)" line save the section
names to an array or list.

Cheers

Mark

---

From: Mark Crispin <[email-masked]>
Date: Mon, 13 May 2002 11:05:17 -0700 (Pacific Daylight Time)

> names to an array or list.

Which is a way of implementing the general answer: get the BODY structure
of the message, then run down the links until you have identified all the
section specifiers of the message.  mtest's display_body() function is a
sample recursive function that has been widely-copied for this purpose.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.