Method EmlToMarkdownAsync
- Namespace
- LMKit.Document.Conversion
- Assembly
- LM-Kit.NET.dll
EmlToMarkdownAsync(byte[], bool, CancellationToken)
Asynchronously converts an EML file (as a byte array) to Markdown.
public static Task<string> EmlToMarkdownAsync(byte[] emlData, bool stripQuotes = false, CancellationToken cancellation = default)
Parameters
emlDatabyte[]The EML file content as a byte array.
stripQuotesboolWhen
true, quoted and reply content is removed from the email body.cancellationCancellationTokenA cancellation token used to cancel the conversion operation.
Returns
Exceptions
- ArgumentNullException
Thrown when
emlDataisnull.
EmlToMarkdownAsync(string, bool, CancellationToken)
Asynchronously converts an EML file at the specified path to Markdown.
public static Task<string> EmlToMarkdownAsync(string inputPath, bool stripQuotes = false, CancellationToken cancellation = default)
Parameters
inputPathstringThe file system path to the EML file.
stripQuotesboolWhen
true, quoted and reply content is removed from the email body.cancellationCancellationTokenA cancellation token used to cancel the conversion operation.
Returns
Exceptions
- ArgumentException
Thrown when
inputPathisnullor whitespace.- FileNotFoundException
Thrown when the specified file does not exist.