I’m trying to create an AppleScript for Yosemite Mail.app that makes copies (not archives) of messages.
Let’s say I have 3 accounts:
Master (IMAP)
Target 1 (IMAP)
Target 2 (Exchange)
I want to select all the messages in the Master inbox – and copy (aka duplicate) those messages to the inboxes of two other accounts, Target 1 and Target 2. In the end, there will be three inboxes, all with the same set of messages – again copies (not archives).
I’ve tried things like:
set mailboxMaster to "Master" set mailboxTargets to {"Target 1", "Target 2"}
repeat with curMailboxTarget in mailboxTargets tell application "Mail" duplicate every message in mailbox "Master" to mailbox curMailboxTarget end tell end repeat
but I get “Mail got an error: Can’t set mailbox”
Ideas? Thanks!
Neil