Converter.ConvertToMhtml

Converter.ConvertToMhtml method

Converts an email message to MHTML format.

public static Task ConvertToMhtml(Stream input, string nameWithExtension, IOutputHandler handler)
ParameterTypeDescription
inputStreamThe email input stream.
nameWithExtensionStringOriginal file name.
handlerIOutputHandlerOutput handler that will receive the .mhtml file.

Return Value

A completed task.

Examples

using var input = File.OpenRead("mail.msg");
var handler = new FolderOutputHandler("C:\\Out");
await Converter.ConvertToMhtml(input, "mail.msg", handler);

See Also