Class MhtmlLoadOptions

MhtmlLoadOptions class

Provides options for controlling how MailMessage instances are loaded from MHTML format. This class allows you to customize the loading behavior for MHTML (MIME HTML) files, particularly for handling TNEF attachments that may be embedded in the message.

public class MhtmlLoadOptions : LoadOptions

Constructors

NameDescription
MhtmlLoadOptions()Initializes a new instance of this class that can be used to loading MailMessage from Mhtml format.

Properties

NameDescription
MessageFormat { get; }Represents the mail message format.It can be in eml,msg or mhtml format. The default value is Eml.
PreferredTextEncoding { get; set; }Gets or sets preferred encoding for message. Forcibly sets the preferred encoding for message subject and body. The default value is null.
PreserveEmbeddedMessageFormat { get; set; }Gets or sets a value indicating whether it is necessary to preserve format of embedded message at loading. By default the value is false.
PreserveTnefAttachments { get; set; }Controls loading TNEF attachment behaviour. By default the value is false.
RemoveSignature { get; set; }Gets or sets a value indicating whether signature will be removed while loading.

Remarks

Use this class with Load to load MHTML files and control TNEF attachment handling. MHTML is a web page archive format that combines HTML content and embedded resources into a single file. The PreserveTnefAttachments property controls whether TNEF attachments (winmail.dat) are decoded or preserved as-is.

See Also