Exported from Bugzilla, issue 3751.
--- Comment added on 8/30/02 9:27:33 AM ---
Deon Herbst, 8/20/02
Hi all,
We use Builder 5 and iPro 1.12 to extract multilevel MIME emails and
attachments. We seem to get the first level of emails and attachments
extracted successfully, however when it comes to nested emails we fail.
e.g.
We have an MIME email and it contains 3 parts. Part 1 has no MIME version
header and no multiparts, Part 2 has no MIME verion header but it has a
content-type header but also no multiparts, Part 3 is a complete nested MIME
email with a MIME version Header and it contains two parts an email and a
jpeg attachment.
// load file
MyMsg=LodFromFile(BaseFileName);
// Access the parts
Entity1=(TIpMimeEntity*)(MyMsg->MimeParts->Parts[0]);
Entity2=(TIpMimeEntity*)(MyMsg->MimeParts->Parts[1]);
Entity3=(TIpMimeEntity*)(MyMsg->MimeParts->Parts[2]);
At this stage using the inspect option of Builder the IsMime and IsMulitPart
properties contain the following values
Entity1: // I agree with these values
IsMime=false;
IsMultiPart=false;
Entity2: // I don't understand these values
IsMime=true; // I am not sure why this is true
IsMultipart=false; // I agree with this value
Entity3: // I don't understand these values
IsMime=true; // I agree wth this value
IsMultiPart=false; // I would have thought that this would be true because
there are valid boundaries etc in the part
When I extract these parts with :
MyMsg->ExtractBodyFile(ExtractedFileName)
I get the correct output for parts 1 & 2 but for part 3 I get the total
nested email wit the jpeg still as part of the part3 email
I have tried to cast Part 3 as TIpMailMessage again and then try to see if
the IsMime and IsMultiPart is filled in correctly, but I got the same values
as before.
Any suggestions on extracting nested Mime emails would be greatly
appreciated
Regards,
Deon Herbst, 8/20/02
Hi all,
I am referring to my previous post -
I see that the problem part 3 has a
Content-Type:message/rfc822 right below the boundary marker. This is used by
the TIpMimeEntity to fill the Content-Type field. However further down in
Part 3 there is another Content-Type: Multipart/mixed.
My question is:
How do I handle a complete RC 822 message which is contained as a part of
another email.
Regards,
Deon Herbst
--- Comment added on 8/30/02 9:28:00 AM ---
Created an attachment (id=163)
SampleEmail.zip - Use this to duplicate the problem