# EmailHtmlExporter

Creates safe local HTML copies, saving embedded images without downloading remote resources.

Class 

`OfficeIMO.Email`

**Namespace**

`OfficeIMO.Email`

**Assembly**

`OfficeIMO.Email.Html`

**Source revision**

`3b680b1b6fb1` with working tree changes

**Source**

[EmailHtmlExporter.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Email.Html/EmailHtmlExporter.cs#L46)

**Modifiers**

static

Creates safe local HTML copies, saving embedded images without downloading remote resources.

## Inheritance

- object
- EmailHtmlExporter

## Remarks

The caller selects the output path. Copies retain the body, sender, date, and To and Cc recipients; HTML sanitization does not anonymize message content.

Filter members 

Show inherited

## Methods

Export 2 overloads

`public static EmailHtmlExportResult Export(EmailMessage message, string path, bool includeAttachments = false, bool overwrite = false, CancellationToken cancellationToken = default)` [#](#method-export-officeimo-email-emailmessage-string-boolean-boolean-threading-cancellationtoken)

[EmailHtmlExporter.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Email.Html/EmailHtmlExporter.cs#L46)

Exports a handle-free message with an operation-scoped full read.

Parameters

**message OfficeIMO.Email.EmailMessage required**

**path string required**

**includeAttachments bool = false optional**

**overwrite bool = false optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`EmailHtmlExportResult`

`public static EmailHtmlExportResult Export(EmailDocument document, string path, bool includeAttachments = false, bool overwrite = false, CancellationToken cancellationToken = default)` [#](#method-export-officeimo-email-emaildocument-string-boolean-boolean-threading-cancellationtoken)

[EmailHtmlExporter.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Email.Html/EmailHtmlExporter.cs#L54)

Exports sanitized HTML and embedded resources. Earlier resource files survive later failures.

Parameters

**document OfficeIMO.Email.EmailDocument required**

**path string required**

**includeAttachments bool = false optional**

**overwrite bool = false optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`EmailHtmlExportResult`

ExportContent 2 overloads

`public static EmailHtmlContent ExportContent(EmailMessage message, CancellationToken cancellationToken = default)` [#](#method-exportcontent-officeimo-email-emailmessage-threading-cancellationtoken)

[EmailHtmlExporter.cs:104](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Email.Html/EmailHtmlExporter.cs#L104)

Creates self-contained HTML for a handle-free message with an operation-scoped full read.

Parameters

**message OfficeIMO.Email.EmailMessage required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`EmailHtmlContent`

`public static EmailHtmlContent ExportContent(EmailDocument document, CancellationToken cancellationToken = default)` [#](#method-exportcontent-officeimo-email-emaildocument-threading-cancellationtoken)

[EmailHtmlExporter.cs:112](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Email.Html/EmailHtmlExporter.cs#L112)

Creates sanitized, self-contained HTML in memory without writing output files.

Parameters

**document OfficeIMO.Email.EmailDocument required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`EmailHtmlContent`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:9CEA4C9E1B8CE92ED696CDC04ECED3B42A427379A762DDAA8637A9ED4C7EDCE9 -->
