How to convert an MSG Outlook File to HTML String in Node.JS

npm install cloudmersive-convert-api-client --save
var CloudmersiveConvertApiClient = require('cloudmersive-convert-api-client');var defaultClient = CloudmersiveConvertApiClient.ApiClient.instance;// Configure API key authorization: Apikeyvar Apikey = defaultClient.authentications['Apikey'];Apikey.apiKey = 'YOUR API KEY';// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)//Apikey.apiKeyPrefix = 'Token';var apiInstance = new CloudmersiveConvertApiClient.ConvertDocumentApi();var inputFile = "/path/to/file"; // File | Input file to perform the operation on.var opts = {'bodyOnly': true, // Boolean | Optional; If true, the HTML string will only include the body of the MSG. Other information such as subject will still be given as properties in the response object. Default is false.'includeAttachments': true // Boolean | Optional; If false, the response object will not include any attachment files from the input file. Default is true.};var callback = function(error, data, response) {if (error) {console.error(error);} else {console.log('API called successfully. Returned data: ' + data);}};apiInstance.convertDocumentMsgToHtml(inputFile, opts, callback);




There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Recursion for Nested, Tree-Structure Components in Vue

test this medium post

The DNA of JavaScript

Reverse Stack using Recursion

Tree-shaking ES6 Modules in webpack 2

Livewire — An Easy Way To Build Dynamic Web Applications (Part 1)

Add share application feature in React Native Expo App

5 things you must know to make a great responsive website

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

More from Medium

How to Convert an Audio File to MP3 Format using JavaScript

How to prevent crashing app while using IOHOOK in electron app

Parsing site with Node JS

Steps to Install Environment for Angular Web Development