title: How to access to Outlook (desktop client on macOS) stored emails programmatically
body: <p>I'm trying to read emails from Outlook (desktop client on macOS) installation programmatically.</p>
  <p>For Thunderbird I only need to read the files stored in <code>/Users/xxxx/Library/Thunderbird/Profiles/xxxx.default-release/ImapMail/someemailaccount/</code>.
  Each file on that directory is named after the name of each folder on the email account  (INBOX, Sent, etc.) and it contains all the emails (header, body and attachments). So all I have to do is to read that file with some programming language and apply the right decoder depending on the <em>Content-Transfer-Encoding</em> header.</p>
  <p>For Outlook I found this file: <em>/Users/xxxx/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile/HxStore.hxd</em> but it looks doesn't look to be readable, is it on a binary format? it is compressed or encrypted?</p>
  <p>I tried to see its contents using <em>Hex Field</em> app and it displays that the file contains some blocks of data but those blocks look to be broken or encrypted/compressed (more info about that file here <a href="https://boncaldoforensics.wordpress.com/2018/12/09/microsoft-hxstore-hxd-email-research/" rel="nofollow noreferrer">https://boncaldoforensics.wordpress.com/2018/12/09/microsoft-hxstore-hxd-email-research/</a>):</p>
  <pre><code>&lt;html&gt;&lt;head&gt;
  &lt;meta http-equiv=&quot;Content-Type&quot; cp=&quot;text/;ñ; charset=utf-8&quot;&gt;&lt;/Lð&lt;body&gt;&lt;div dir=&quot;ltr&quot;&gt;1234567890ñ&gt;
  ...
  </code></pre>
  <p>As you can see above, the contents look to be there but there are some strange characters on it. Also, the file has a lot of sections with no characters or random ones.</p>
  <p>Does anybody know how can I read this file?</p>