Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

EmailAttachmentTextReader

Namespace OfficeIMO.Email
Assembly OfficeIMO.Email
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, Int64 maxBytes = 16777216, CancellationToken cancellationToken = default) #
Returns: EmailAttachmentTextResult

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 requiredposition: 0
maxBytes System.Int64 = 16777216 optionalposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2