Identifing Multi-Boundary Messages with Embedded Messages #148
Description
Jeffery,
I have some multi-part, multi-boundary messages that have Embedded Messages, but the BodyParts array does not give any means to identify the message in the proper content-type, instead it returns the embedded messages parts.
Here is a sample email expanded upon from the RFC1341 sample to include an embedded email, it does parse in Outlook correctly:
From: Nathaniel Borenstein nsb@bellcore.com
To: Ned Freed ned@innosoft.com
Subject: Sample message
MIME-Version: 1.0
Content-type: multipart/mixed; boundary="simple boundary"
This is the preamble. It is to be ignored, though it
is a handy place for mail composers to include an
explanatory note to non-MIME compliant readers.
--simple boundary
This is implicitly typed plain ASCII text.
It does NOT end with a linebreak.
--simple boundary
Content-type: text/plain; charset=us-ascii
This is explicitly typed plain ASCII text.
It DOES end with a linebreak.
--simple boundary
Content-Type: message/rfc822
From: Jerry Mouse I@GetTheCat.com
To: Tom Cat I@AmTheCat.com
Subject: Wiskers
MIME-Version: 1.0
Content-type: multipart/mixed; boundary="TomAndJerry boundary"
This is the preamble. It is to be ignored, though it
is a handy place for mail composers to include an
explanatory note to non-MIME compliant readers.
--TomAndJerry boundary
Implicite Message
--TomAndJerry boundary
Content-type: text/plain; charset=us-ascii
Explicite Message
--TomAndJerry boundary--
--simple boundary--
This is the epilogue. It is also to be ignored.
[EOM]
Enumerating the parts returns:
BodyParts:
[MimeKit.TextPart] {This is implicitly typed plain ASCII text. It does NOT end with a line break. }
[MimeKit.TextPart] {Content-type: text/plain; charset=us-ascii This is explicitly typed plain ASCII text. It DOES end with a line break. }
[MimeKit.TextPart] {Implicit Message}
[MimeKit.TextPart] {Content-type: text/plain; charset=us-ascii Explicit Message}
And the text for the message is set correctly.
TextBody: {This is implicitly typed plain ASCII text. It does NOT end with a line break. }
However I think that the body parts should be:
[MimeKit.TextPart] {This is implicitly typed plain ASCII text. It does NOT end with a line break. }
[MimeKit.TextPart] {Content-type: text/plain; charset=us-ascii This is explicitly typed plain ASCII text. It DOES end with a line break. }
[MimeKit.MessagePart] {Wiskers}