Table of Contents

Class EmlToMarkdown

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

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

public static class EmlToMarkdown
Inheritance
EmlToMarkdown
Inherited Members

Examples

using LMKit.Document.Conversion;

byte[] emlBytes = File.ReadAllBytes("message.eml");
string markdown = EmlToMarkdown.Convert(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

Convert(byte[], bool, CancellationToken)

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

Convert(string, bool, CancellationToken)

Converts an EML file at the specified path to Markdown.

ConvertAsync(byte[], bool, CancellationToken)

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

ConvertAsync(string, bool, CancellationToken)

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

Share