<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
<style>
div.markdown { white-space: normal; }
div.plaintext { white-space: normal; }
body { font-family: sans-serif; }
h1 { font-size: 1.4em; }
h2 { font-size: 1.2em; }
h3 { font-size: 1.1em; }
blockquote { margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777; }
blockquote blockquote { border-left-color: #999999; color: #999999; }
blockquote blockquote blockquote { border-left-color: #BBBBBB; color: #BBBBBB; }
a { color: #3983C4; }
blockquote a { color: #777777; }
blockquote blockquote a { color: #999999; }
blockquote blockquote blockquote a { color: #BBBBBB; }
@media (prefers-color-scheme: dark) { blockquote { border-left-color: #BBBBBB; color: #BBBBBB; }
blockquote blockquote { border-left-color: #999999; color: #999999; }
blockquote blockquote blockquote { border-left-color: #777777; color: #777777; }
a { color: #3983C4; }
blockquote a { color: #BBBBBB; }
blockquote blockquote a { color: #999999; }
blockquote blockquote blockquote a { color: #777777; }
}
pre { margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; max-width: 90vw; }
code { margin: 0; padding: 0 0.4em; border-radius: 3px; background-color: #F7F7F7; }
pre > code { padding: 0px; }
math[display="inline"] > mrow { padding:5px; }
div.footnotes li p { margin: 0.2em 0; }
</style>
</head>
<body>
<div class="markdown">
<p dir="auto">On 15 Jan 2019, at 5:03, Eric Sharakan wrote:</p>

</div>
<div class="plaintext"><blockquote><p dir="auto">I'm looking to export mail to EagleFiler while preserving the messages' tags.  See this thread over on the EagleFiler forum: <a href="https://c-command.com/forums/showthread.php/5443-Support-for-Mail-tags-(as-implemented-by-MailMate)?p=21381#post21381">https://c-command.com/forums/showthread.php/5443-Support-for-Mail-tags-(as-implemented-by-MailMate)?p=21381#post21381</a><br>
<br>
Would it be possible to write a bundle to do something like this?</p>
</blockquote></div>
<div class="markdown">

<p dir="auto">Yes. The EagleFiler bundle command already uses some environment variables to let the <code>add</code> command easily access the subject and message-id of the message. You can add this to also get IMAP keywords:</p>

<pre><code>MM_FLAGS=${#flags}\n
</code></pre>

<p dir="auto">Or this to only get the subset for which tags have been defined:</p>

<pre><code>MM_TAGS=${##tags}\n
</code></pre>

<p dir="auto">The caveat is that there is no easy way to get the display names of multiple tags. (Implementation details I haven't given enough thought yet.)</p>

<p dir="auto">-- <br>
Benny</p>
</div>

</body>
</html>