mimekit-ts - v1.0.0
    Preparing search index...

    Class MimeEntityAbstract

    Base class for all MIME entities.

    A MIME entity has a set of headers and a Content-Type. Subclasses provide the concrete content model for single parts, multipart containers, and embedded messages.

    Hierarchy (View Summary)

    Index
    headers: HeaderList

    The headers belonging to this MIME entity.

    contentType: ContentType

    The entity's Content-Type value.

    ensureNewLine: boolean = false
    lazyLoaded: Set<LazyField> = ...
    • get isDisposed(): boolean

      C#: internal IsDisposed (exposed publicly; upstream tests read it via InternalsVisibleTo).

      Returns boolean

    • get contentBase(): string | null

      Gets or sets the absolute Content-Base URI.

      Returns string | null

      value is not an absolute URI or the entity has been disposed.

    • set contentBase(value: string | URL | null): void

      Sets the absolute Content-Base URI.

      Parameters

      • value: string | URL | null

      Returns void

    • get contentLocation(): string | null

      Gets or sets the Content-Location URI.

      Returns string | null

      The entity has been disposed.

    • set contentLocation(value: string | URL | null): void

      Sets the Content-Location URI.

      Parameters

      • value: string | URL | null

      Returns void

    • get contentId(): string | null

      Gets or sets the Content-Id header value.

      Returns string | null

      value is not a valid message id or the entity has been disposed.

    • set contentId(value: string | null): void

      Sets the Content-Id header value.

      Parameters

      • value: string | null

      Returns void

    • get isAttachment(): boolean

      Gets or sets whether this entity is marked as an attachment.

      Setting this updates the Content-Disposition disposition between attachment and inline.

      Returns boolean

    • set isAttachment(value: boolean): void

      Sets whether this entity is marked as an attachment.

      Parameters

      • value: boolean

      Returns void

    • Dispatches to the specific visitor method for this MIME entity.

      Parameters

      Returns void

      visitor is null or the entity has been disposed.

    • Prepares the entity for transport under the requested encoding constraint.

      Parameters

      • constraint: string

        The encoding constraint.

      • OptionalmaxLineLength: number

        The maximum encoded line length.

      Returns void

    • Writes the MIME entity to a stream.

      Parameters

      • stream: Stream

        The destination stream.

      Returns void

      options or stream is null, or the entity has been disposed.

    • Writes the MIME entity to a stream.

      Parameters

      Returns void

      options or stream is null, or the entity has been disposed.

    • Writes the MIME entity to a stream.

      Parameters

      • options: FormatOptions

        Formatting options.

      • stream: Stream

        The destination stream.

      • contentOnly: boolean

        Whether to omit the entity headers.

      Returns void

      options or stream is null, or the entity has been disposed.

    • Serializes the MIME entity to a string.

      Returns string

      The serialized MIME entity.

    • Parameters

      • objectName: string = 'MimeEntity'

      Returns void

    • Parameters

      • name: string
      • value: string

      Returns void

    • Parameters

      • name: string
      • rawValue: Uint8Array

      Returns void

    • C#: MimeEntity.Load. Parses a MIME entity from a stream (or byte buffer), or — given an explicit Content-Type — from a bare content stream (the HttpWebResponse use-case, where headers are parsed separately). Parse errors are returned as an Err (C#: FormatException) per the port's Result convention.

      Parameters

      Returns Result<MimeEntity>

    • C#: MimeEntity.Load. Parses a MIME entity from a stream (or byte buffer), or — given an explicit Content-Type — from a bare content stream (the HttpWebResponse use-case, where headers are parsed separately). Parse errors are returned as an Err (C#: FormatException) per the port's Result convention.

      Parameters

      Returns Result<MimeEntity>

    • C#: MimeEntity.Load. Parses a MIME entity from a stream (or byte buffer), or — given an explicit Content-Type — from a bare content stream (the HttpWebResponse use-case, where headers are parsed separately). Parse errors are returned as an Err (C#: FormatException) per the port's Result convention.

      Parameters

      Returns Result<MimeEntity>