Table of Contents

Class EmlMarkdownConverter

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

Provides conversion methods from EML (email) files to Markdown.

public static class EmlMarkdownConverter
Inheritance
EmlMarkdownConverter
Inherited Members

Examples

using LMKit.Document.Conversion;

byte[] emlBytes = File.ReadAllBytes("message.eml");
string markdown = EmlMarkdownConverter.EmlToMarkdown(emlBytes);

Remarks

Converts EML email messages into structured Markdown, preserving headers (From, To, Cc, Date, Subject) as a metadata block and the email body as Markdown content. HTML-only emails are converted to Markdown automatically, preserving links, formatting, and structure.

Attachments and inline images are listed at the end of the Markdown output with file name, MIME type, and size. Calendar events (ICS) are extracted and rendered as structured sections when present.

Methods

EmlToMarkdown(byte[], bool, CancellationToken)

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

EmlToMarkdown(string, bool, CancellationToken)

Converts an EML file at the specified path to Markdown.

EmlToMarkdownAsync(byte[], bool, CancellationToken)

Asynchronously converts an EML file (as a byte array) to Markdown.

EmlToMarkdownAsync(string, bool, CancellationToken)

Asynchronously converts an EML file at the specified path to Markdown.