Class HeadersFormattingOptions

HeadersFormattingOptions class

The base class of the options for saving a message to HTML or MHTML: how the headers are formatted, which are shown, and how embedded resources are rendered.

public abstract class HeadersFormattingOptions : SaveOptions

Constructors

NameDescription
HeadersFormattingOptions()Initializes a new instance of the HeadersFormattingOptions class.

Properties

NameDescription
AfterHeadersFormat { get; set; }Gets or sets the HTML written after the block of headers.
BeforeHeadersFormat { get; set; }Gets or sets the HTML written before the block of headers.
CssStyles { get; set; }Gets or sets additional CSS styles added to the output.
CustomProgressHandler { get; set; }Gets or sets a handler that is called as the saving progresses.
DefaultHeaderFormat { get; set; }Gets or sets the HTML format of a header line, from which the template of each header in FormatTemplates is built; {0} stands for the name of the header.
DefaultPageHeaderFormat { get; set; }Gets or sets the HTML format of the page header.
ExtractHTMLBodyResourcesAsAttachments { get; set; }Gets or sets a value indicating whether the resources of the HTML body, such as images, are also written as attachments. The default is false.
FormatTemplates { get; }Gets the formats of individual headers, keyed by the names in MhtTemplateName.
MailMessageSaveType { get; set; }Gets or sets the format the options save to.
RenderedContactFields { get; set; }Gets or sets the groups of contact fields written for a contact. The default is ContactFieldsSet.AllExisting.
RenderingHeaders { get; }Gets the headers written to the output, in order, as names from MhtTemplateName. By default: From, Sent, To, Cc, Bcc, Subject, Attachments, Importance and Categories.
Timeout { get; set; }Gets or sets the time limit, in milliseconds, for formatting the message. The default is 3000 (3 seconds).

Events

NameDescription
event ResourceHtmlRenderingOccurs for each attachment rendered into the HTML; set the properties of the event arguments to supply the content, file or caption to use for it.
event TimeoutReachedOccurs when formatting the message takes longer than Timeout.

Remarks

Use HtmlSaveOptions or MhtSaveOptions.

See Also