Converter.ConvertEmlOrMsg

Converter.ConvertEmlOrMsg method

Converts an email file to a specific format if it’s not already in that format.

public static Task ConvertEmlOrMsg(Stream input, string nameWithExtension, IOutputHandler handler, 
    string outputType)
ParameterTypeDescription
inputStreamThe email input stream.
nameWithExtensionStringThe file name with extension.
handlerIOutputHandlerThe output handler for writing the result.
outputTypeStringTarget format (e.g., “eml”, “msg”, “html”, “mht”, “mhtml”).

Return Value

A task that represents the asynchronous operation.

Examples

using var input = File.OpenRead("email.eml");
var outputHandler = new FolderOutputHandler("C:\\Converted");
await Converter.ConvertEmlOrMsg(input, "email.eml", outputHandler, "html");

See Also