Load Email document with options

GroupDocs.Conversion provides EmailLoadOptions to give you control over how the source email document will be processed. The following options could be set:

Control fields visibility

The following code snippet shows how to convert an Email document and control the visibility of the fields:

const outputPath = "ConvertEmailWithAlteringFieldsVisibility.pdf"

const loadOptions = new groupdocs.conversion.EmailLoadOptions();
loadOptions.setDisplayHeader(false);
loadOptions.setDisplayFromEmailAddress(false);
loadOptions.setDisplayToEmailAddress(false);
loadOptions.setDisplayEmailAddress(false);
loadOptions.setDisplayCcEmailAddress(false);
loadOptions.setDisplayBccEmailAddress(false);
loadOptions.setConvertOwned(false);

const converter = new groupdocs.conversion.Converter("sample.msg", loadOptions)
const convertOptions = new groupdocs.conversion.PdfConvertOptions()

console.log(`Email document converted successfully to ${outputPath} (with altering fields visibility)`)
converter.convert(outputPath, convertOptions)