# EmailAttachmentTextReader

Decodes bounded text attachments using their MIME charset and any Unicode byte-order mark.

Class 

`OfficeIMO.Email`

**Namespace**

`OfficeIMO.Email`

**Assembly**

`OfficeIMO.Email`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[EmailAttachmentTextReader.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Reading/EmailAttachmentTextReader.cs#L12)

**Modifiers**

static

Decodes bounded text attachments using their MIME charset and any Unicode byte-order mark.

## Inheritance

- object
- EmailAttachmentTextReader

Filter members 

Show inherited

## Methods

`public static EmailAttachmentTextResult Read(EmailAttachment attachment, long maxBytes = 16777216, CancellationToken cancellationToken = default)` [#](#method-read-officeimo-email-emailattachment-int64-threading-cancellationtoken)

[EmailAttachmentTextReader.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Email/Reading/EmailAttachmentTextReader.cs#L12)

Reads decoded attachment bytes. A Unicode BOM takes precedence over the declared charset. Charsetless content uses the MIME reader's UTF-8 then Windows-1252 recovery policy. The attachment's reopenable source is disposed within the call.

Parameters

**attachment OfficeIMO.Email.EmailAttachment required**

**maxBytes long = 16777216 optional**

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

Returns

`EmailAttachmentTextResult`

## 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:920EF4A23345DC612D736419713A9DF598D843EAE072F0340188AEF0BB3B4BD3 -->
