Table of Contents

Method MboxToMarkdown

Namespace
LMKit.Document.Conversion
Assembly
LM-Kit.NET.dll

MboxToMarkdown(byte[], bool, CancellationToken)

Converts an MBOX file (as a byte array) to Markdown.

public static string MboxToMarkdown(byte[] mboxData, bool stripQuotes = false, CancellationToken cancellation = default)

Parameters

mboxData byte[]

The MBOX file content as a byte array.

stripQuotes bool

When true, quoted and reply content is removed from each email body.

cancellation CancellationToken

A cancellation token used to cancel the conversion operation.

Returns

string

A Markdown string representing all email messages in the mailbox.

Exceptions

ArgumentNullException

Thrown when mboxData is null.

MboxToMarkdown(string, bool, CancellationToken)

Converts an MBOX file at the specified path to Markdown.

public static string MboxToMarkdown(string inputPath, bool stripQuotes = false, CancellationToken cancellation = default)

Parameters

inputPath string

The file system path to the MBOX file.

stripQuotes bool

When true, quoted and reply content is removed from each email body.

cancellation CancellationToken

A cancellation token used to cancel the conversion operation.

Returns

string

A Markdown string representing all email messages in the mailbox.

Exceptions

ArgumentException

Thrown when inputPath is null or whitespace.

FileNotFoundException

Thrown when the specified file does not exist.