# EmailAttachmentExtractionOptions

Bounds attachment export without following linked attachment paths.

Class 

`OfficeIMO.Email`

**Namespace**

`OfficeIMO.Email`

**Assembly**

`OfficeIMO.Email`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[EmailAttachmentExtractionOptions.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Export/EmailAttachmentExtractionOptions.cs#L9)

**Modifiers**

sealed

Bounds attachment export without following linked attachment paths.

## Inheritance

- object
- EmailAttachmentExtractionOptions

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Accepted by parameters 2

- Method [EmailAttachmentExtractor.Extract](/api/email/officeimo-email-emailattachmentextractor/#method-extract-officeimo-email-emaildocument-string-officeimo-email-emailattachmentextractionoptions-threading-cancellationtoken) parameter `options`
- Method [EmailAttachmentExtractor.ExtractAsync](/api/email/officeimo-email-emailattachmentextractor/#method-extractasync-officeimo-email-emaildocument-string-officeimo-email-emailattachmentextractionoptions-threading-cancellationtoken) parameter `options`

Filter members 

Show inherited

## Constructors

EmailAttachmentExtractionOptions 2 overloads

`public EmailAttachmentExtractionOptions(int maxAttachments = 1000, long maxAttachmentBytes = 67108864, long maxTotalBytes = 268435456, int maxDepth = 4, bool recurseEmbeddedMessages = false, bool includeInline = true, bool includeHidden = false)` [#](#constructor-ctor-int32-int64-int64-int32-boolean-boolean-boolean)

[EmailAttachmentExtractionOptions.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Export/EmailAttachmentExtractionOptions.cs#L9)

Creates an export policy. Embedded messages are exported as EML; nested attachments are optional.

Parameters

**maxAttachments int = 1000 optional**

**maxAttachmentBytes long = 67108864 optional**

**maxTotalBytes long = 268435456 optional**

**maxDepth int = 4 optional**

**recurseEmbeddedMessages bool = false optional**

**includeInline bool = true optional**

**includeHidden bool = false optional**

`public EmailAttachmentExtractionOptions(IEnumerable<int>? selectedAttachmentIndexes, string? fileNamePrefix = null, int maxAttachments = 1000, long maxAttachmentBytes = 67108864, long maxTotalBytes = 268435456, int maxDepth = 4, bool recurseEmbeddedMessages = false, bool includeInline = true, bool includeHidden = false)` [#](#constructor-ctor-collections-generic-ienumerable-system-int32-string-int32-int64-int64-int32-boolean-boolean-boolean)

[EmailAttachmentExtractionOptions.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Export/EmailAttachmentExtractionOptions.cs#L13)

Creates a bounded policy for selected top-level attachments, with an optional source-specific filename prefix.

Parameters

**selectedAttachmentIndexes System.Collections.Generic.IEnumerable<int>? required**

**fileNamePrefix string? = null optional**

**maxAttachments int = 1000 optional**

**maxAttachmentBytes long = 67108864 optional**

**maxTotalBytes long = 268435456 optional**

**maxDepth int = 4 optional**

**recurseEmbeddedMessages bool = false optional**

**includeInline bool = true optional**

**includeHidden bool = false optional**

## 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?`

## Properties

`public int MaxAttachments { get; }` [#](#property-maxattachments)

[EmailAttachmentExtractionOptions.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Export/EmailAttachmentExtractionOptions.cs#L31)

Maximum operation-wide attachment visits, including skipped entries and embedded-message serialization.

`public long MaxAttachmentBytes { get; }` [#](#property-maxattachmentbytes)

[EmailAttachmentExtractionOptions.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Export/EmailAttachmentExtractionOptions.cs#L33)

Maximum decoded or serialized bytes for one exported attachment.

`public long MaxTotalBytes { get; }` [#](#property-maxtotalbytes)

[EmailAttachmentExtractionOptions.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Export/EmailAttachmentExtractionOptions.cs#L35)

Maximum bytes consumed across attachments, including failed attempts.

`public int MaxDepth { get; }` [#](#property-maxdepth)

[EmailAttachmentExtractionOptions.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Export/EmailAttachmentExtractionOptions.cs#L37)

Maximum embedded-message nesting depth; direct attachments have depth zero.

`public bool RecurseEmbeddedMessages { get; }` [#](#property-recurseembeddedmessages)

[EmailAttachmentExtractionOptions.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Export/EmailAttachmentExtractionOptions.cs#L39)

Whether to visit attachments inside embedded messages as well as exporting their EML.

`public bool IncludeInline { get; }` [#](#property-includeinline)

[EmailAttachmentExtractionOptions.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Export/EmailAttachmentExtractionOptions.cs#L41)

Whether to export inline resources.

`public bool IncludeHidden { get; }` [#](#property-includehidden)

[EmailAttachmentExtractionOptions.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Export/EmailAttachmentExtractionOptions.cs#L43)

Whether to export attachments marked hidden.

`public IReadOnlyList<int>? SelectedAttachmentIndexes { get; }` [#](#property-selectedattachmentindexes)

[EmailAttachmentExtractionOptions.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Export/EmailAttachmentExtractionOptions.cs#L45)

Optional top-level zero-based indexes. Null selects all; an empty collection selects none.

`public string? FileNamePrefix { get; }` [#](#property-filenameprefix)

[EmailAttachmentExtractionOptions.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Export/EmailAttachmentExtractionOptions.cs#L47)

Optional portable prefix for saving several messages into one directory.

<!-- PowerForge markdown artifact sha256:33058471AFAEDE1AC439CD54AFF6348BB2B94DADD36DF0A604969C20A023FA83 -->
