<div>
<p dir="auto">On 25 Apr 2015, at 8:25, Patrik Fältström wrote:</p>

<blockquote style="padding-left: 5px; border-left-style: solid; border-left-color: green; border-left-width: 4px; color: green; margin: 0 0 5px;">
<p dir="auto">What I would like to be able to do is to move messages to a mailbox which is:</p>

<pre style="margin-left: 15px; padding: 5px; overflow: auto; border: thin solid gray; margin-right: 15px; background: #E4E4E4;"><code>"/Archives/"${#date.month}
</code></pre>

<p dir="auto">...and this on a specific IMAP Account (i.e. I have multiple IMAP accounts and want to move to one of them).</p>

<p dir="auto">So I guess my question is whether one can have a variable as target to a moveToMailbox rule?</p>
</blockquote>

<p dir="auto">Well, I guess it's really two questions. Moving to an explicit account requires an <code>imap:</code> URL. You can get this by selecting an IMAP mailbox and then use ⌘C to put it on the pasteboard. You'll get something like:</p>

<pre style="margin-left: 15px; padding: 5px; overflow: auto; border: thin solid gray; margin-right: 15px; background: #E4E4E4;"><code>imap://username%40example.com@imap.example.com/Archive
</code></pre>

<p dir="auto">The simple answer to the other question is no. The <code>moveToMailbox:</code> binding takes the argument verbatim. There is no expansion of variables. I guess I could introduce something like <code>moveToMailboxFormat:</code> for this purpose. I'll consider that.</p>

<p dir="auto">The most flexible solution is to create a bundle command which based on the given message returns an action which tells MailMate to move the message. This would not be limited to format strings. I could perhaps be persuaded to provide an example, but I don't have time right now :-)</p>

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

</div>