using GroupDocs.Conversion;

namespace ConvertMSGtoHTMLUsingCSharp
{
    internal class Program
    {
        static void Main(string[] args)
        {
            // Set License to avoid the limitations of Conversion library
            License lic = new License();
            lic.SetLicense(@"GroupDocs.Conversion.lic");

            // Import MSG document 
            var converter = new GroupDocs.Conversion.Converter("input.msg");

            // Get conversion option for final output document
            var conversionoptions = converter.GetPossibleConversions()["html"]
                .ConvertOptions;

            // Save the HTML to disk
            converter.Convert("output.html", conversionoptions);
        }
    }
}