<div class="markdown">
<p dir="auto">On 20 May 2015, at 4:50, Benny Kjær Nielsen wrote:</p>

<blockquote>
<p dir="auto">On 20 May 2015, at 3:05, Sherif Soliman wrote:</p>

<blockquote>
<p dir="auto">Does anyone know if it's possible to access MailMate's database** - the one that contains all the metadata about emails that it manages?</p>
</blockquote>

<p dir="auto">I guess it's possible, but it would never be safe to do so while MailMate is running. It could also change at any time in the future.</p>

<blockquote>
<p dir="auto">So, ideally I'd be able to have a data file (or several) in some kind of format (csv, JSON, XML, ...), with all the basic headers/metadata:<br>
- from<br>
- to<br>
- cc<br>
- date<br>
- subject line</p>
</blockquote>

<p dir="auto">The best way to generate such data would be to create a bundle with one or more commands. I would love to have a general statistics bundle which users could use to visualize aspects of their emails (or email activity).</p>

<blockquote>
<p dir="auto">Less ideally it would be a database in some readable but non-standard format and I'd have to do my own parsing with regex or other gymnastics.</p>

<p dir="auto"><em>Least</em> ideally is that I would have to write a script that would go through all the directories in <code>~/Library/Application Support/MailMate/Messages/...</code> and scrape/analyze each single .eml file in each single directory. That would be very IO heavy and seems like a waste since MailMate has already done that for itself. That is the last resort, but I'd like to not have to do that.</p>
</blockquote>

<p dir="auto">Manually parsing email headers “correctly” is a <em>huge</em> task and I would strongly discourage such an approach.</p>

<blockquote>
<p dir="auto">Any tips?</p>
</blockquote>

<p dir="auto">If you want to explore creating a Statistics bundle for MailMate then I'll be happy to help. We can do that off list.</p>
</blockquote>

<p dir="auto">Awesome, I've replied off-list.</p>

<p dir="auto">S</p>

</div>