I am writing an Outlook add-in that saves emails for historical purposes. The Outlook MSG format, unfortunately, is too verbose, even when compressed. This leads to the fact that saved MSG files are many times superior to their text equivalent. However, saving all messages as text has obvious drawbacks in the absence of attachments, images, and any appropriate formatting.
For most letters this is not a problem, but emails with a certain degree of complex formatting, images, attachments (etc.) should be saved in MSG format.
Most user emails are sent as HTML, which make my algorithm look something like this:
1. If email has attachment(s), save as MSG and be done 2. If email is stored as text, save as text and be done 3. If email is not stored as HTML store as MSG and be done 4. Decide if the HTML should be converted to text and store it as text if so store it as MSG if not
This is simple, except for step # 4: How can I decide in which format HTML formatting should be formatted when saving?
source share