I’ve had the same remote training script for about a half dozen years:
on run my doRemoteTraining() end run on perform_mail_action(_info) my doRemoteTraining() end perform_mail_action on doRemoteTraining() tell application "Mail" set _mailbox to mailbox "Is Spam" of account "Don" repeat with _message in messages of _mailbox set _source to _message's source tell application "SpamSieve" to add spam message _source -- Would like this to go On My Mac, but don't know how set _message's mailbox to mailbox "Junk" of account "Don" end repeat end tell end doRemoteTraining
I added the doRemoteTraining() and run handlers tonight so I could troubleshoot. I moved the script to my Mountain Lion system after running it for years on Leopard. I’m getting an error on this line:
set _mailbox to mailbox "Is Spam" of account "Don"
The error is “Mail got an error: Can’t get mailbox “Is Spam” of account “Don”.” I double-checked; the account is correct, the mailbox is correct, and if I loop through the mailbox names in the account I get a hit on “_mailbox is equal to ‘Is Spam’”. If I use your remote training script, Michael, I still get the error. Any ideas?