I looked and looked but couldn't find an answer to this seemingly simple question (I'm also new to AppleScript). Basically, I just want a script that sets up a Rule and moves messages to mailbox "Foo" (a Mailbox in my IMAP account). Here's what I have:
tell application "Mail"
set newRule to make new rule at end of rules with properties {name:"Foo Internal", enabled:true}
tell newRule
make new rule condition at end of rule conditions with properties {rule type:any recipient, expression:"internal_foo@foo.com", qualifier:does contain value}
set move message to mailbox "Foo"
end tell
end tell
I've tried various combinations of this line...
set move message to mailbox "Foo"
...including specifying the IMAP account, setting it to a variable, and so on. I'm not a programmer but I really want to script these rules cause I setup rules all the time at my job. Any help?