[MlMt] Moving a message to a folder based on what account contains it

Joshua Fishburn josh at joshfishburn.com
Sun Aug 5 14:29:05 EDT 2018


Short Version: Is there a way to create a universal key binding to move 
a message to a different folder depending on the account that the 
message is in?

Long Version and background:

I use Sanebox and have several “snooze” folders. I also have two 
mail accounts connected, and annoyingly Sanebox automatically appends 
different symbols to these snooze folders for each account. For example, 
one account’s tomorrow snooze folder is named “@SaneTomorrow”, 
while the other account’s is named “+SaneTomorrow”. I would like 
to be able to set a universal keybinding to move a message into the 
current account’s SaneTomorrow folder.

I use Mail Act-On with Mail.app to do this now, and it handles the 
situation by allowing me to duplicate the keybinding, and then I just 
have to be careful to put the correct logic (e.g. “if the account is 
#1, file message in @SaneTomorrow; otherwise file it in 
+SaneTomorrow”). From the mailing list, I saw one conversation that 
led me to wonder if a technique would work to achieve this, in 
combination with the ability to set [custom keybindings for 
folders](https://manual.mailmate-app.com/custom_key_bindings) “within 
the account the message is currently located”.

[This 
conversation](https://www.mail-archive.com/mailmate@lists.freron.com/msg00972.html) 
describes how multiple commands can be assigned to a single keybinding. 
Could I assign multiple `moveToMailbox` commands to a single keybinding 
and assume that if the first command failed, MailMate would just move on 
to process the next? And similarly, if the first command succeeded, the 
second command would fail?

I tried this, but it didn’t do what I expected:

`”^1” = (“moveToMailbox:”, “/@SaneTomorrow”, 
“moveToMailbox:”, “/+SaneTomorrow”);`

Instead of failing, MailMate actually creates the @SaneTomorrow folder 
in account #2 when I try to move a message that isn’t in account #1 
with this command. So I’m left wondering if there’s a way to 
implement the “if account 1” login in the keybinding itself, or if 
there’s another mechanism by which to achieve this.

Thanks in advance,
Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20180805/1fe2dfb0/attachment.html>


More information about the mailmate mailing list