SharpMimeTools Documented Class Library

SharpMessage Constructor (Stream, Boolean, Boolean)

[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


Stream that contains the message content
true to allow attachments; false to skip them.
true to allow HTML content; false to ignore the html content.


When the attachments parameter is true it's equivalent to adding anmar.SharpMimeTools.MimeTopLevelMediaType.application,, anmar.SharpMimeTools.MimeTopLevelMediaType.image, 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