Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

EmailAttachmentTextReader

OfficeIMO.Email

Namespace
OfficeIMO.Email
Assembly
OfficeIMO.Email
Source revision
ba882f6b0d07 with working tree changes
Modifiers
static

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

Inheritance

  • object
  • EmailAttachmentTextReader

Methods

public static EmailAttachmentTextResult Read(EmailAttachment attachment, long maxBytes = 16777216, CancellationToken cancellationToken = default) #

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