+/*
+ * Find any MIME content in the message that is a message/rfc822 and add
+ * it to the list of messages to burst.
+ */
+
+static void
+find_mime_parts (CT content, struct smsg *smsgs, int *msgp)
+{
+ struct multipart *m;
+ struct part *part;
+
+ /*
+ * If we have a message/rfc822, then it's easy.
+ */
+
+ if (content->c_type == CT_MESSAGE &&
+ content->c_subtype == MESSAGE_RFC822) {
+ smsgs[*msgp].s_start = content->c_begin;
+ smsgs[*msgp].s_stop = content->c_end;
+ (*msgp)++;
+ return;
+ }
+
+ /*
+ * Otherwise, if we do have multiparts, try all of the sub-parts.
+ */
+
+ if (content->c_type == CT_MULTIPART) {
+ m = (struct multipart *) content->c_ctparams;
+
+ for (part = m->mp_parts; part; part = part->mp_next)
+ find_mime_parts(part->mp_part, smsgs, msgp);
+ }
+
+ return;
+}
+
+