SharpMimeTools Documented Class Library

SharpMessage Constructor (Stream, Boolean, Boolean, String, String)

[This is preliminary documentation and subject to change.]

Initializes a new instance of the SharpMessage class based on the supplied Stream.

public SharpMessage(
   Stream message,
   bool attachments,
   bool html,
   string path,
   string preferredtextsubtype
);

Parameters

message
Stream that contains the message content
attachments
true to allow attachments; false to skip them.
html
true to allow HTML content; false to ignore the html content.
path
A String specifying the path on which to save the attachments found.
preferredtextsubtype
A String specifying the subtype to select for text parts that contain aternative content (plain, html, ...). Specify the null reference to maintain the default behavior (prefer whatever the originator sent as the preferred part). If there is not a text part with this subtype, the default one is used.

Remarks

When the attachments parameter is true it's equivalent to adding anmar.SharpMimeTools.MimeTopLevelMediaType.application, anmar.SharpMimeTools.MimeTopLevelMediaType.audio, anmar.SharpMimeTools.MimeTopLevelMediaType.image, anmar.SharpMimeTools.MimeTopLevelMediaType.video to the allowed MimeTopLevelMediaType.
anmar.SharpMimeTools.MimeTopLevelMediaType.text, anmar.SharpMimeTools.MimeTopLevelMediaType.multipart and anmar.SharpMimeTools.MimeTopLevelMediaType.message are allowed in any case.

In order to have better control over what is parsed, see the other contructors.

See Also

SharpMessage Class | anmar.SharpMimeTools Namespace | SharpMessage Constructor Overload List