- part_start, length,
- content_type, charset, encoding, disposition,
- name, filename,
- CallBack, NULL, NULL,
- userdata, dont_decode);
+ part_start, length,
+ content_type, charset, encoding, disposition,
+ name, filename,
+ CallBack, NULL, NULL,
+ userdata, dont_decode
+ );
+
+ /*
+ * Now if it's an encapsulated message/rfc822 then we have to recurse into it
+ */
+ if (!strcasecmp(content_type, "message/rfc822")) {
+
+ if (PreMultiPartCallBack != NULL) {
+ PreMultiPartCallBack("", "", partnum, "",
+ NULL, content_type, charset,
+ 0, encoding, userdata);
+ }
+ if (CallBack != NULL) {
+ if (strlen(partnum) > 0) {
+ snprintf(nested_partnum,
+ sizeof nested_partnum,
+ "%s.%d", partnum,
+ ++part_seq);
+ }
+ else {
+ snprintf(nested_partnum,
+ sizeof nested_partnum,
+ "%d", ++part_seq);
+ }
+ the_mime_parser(nested_partnum,
+ part_start, part_end,
+ CallBack,
+ PreMultiPartCallBack,
+ PostMultiPartCallBack,
+ userdata,
+ dont_decode
+ );
+ }
+ if (PostMultiPartCallBack != NULL) {
+ PostMultiPartCallBack("", "", partnum, "", NULL,
+ content_type, charset, 0, encoding, userdata);
+ }
+
+
+ }
+