Converter.ConvertToMht

Converter.ConvertToMht method

Converts an email message to MHT format.

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

Return Value

A completed task.

Examples

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

See Also