Applescript error using Mail when trying to get a mailbox folder
tell current application
do shell script "/usr/bin/logger -s 'SpamSieve [Apple Mail Server Junk Mailbox] Error -1728 filtering mailbox “Spam” of account “Techworkspro[Gmail]”: Mail got an error: Can’t get mailbox \"Spam\" of account \"Techworkspro[Gmail]\".'"
The above script snippet fails to retrieve an existing mailbox in Google Gmail although it works in other accounts. It is being used in filtering spam. The mailbox exists and has email data in it. So my questions are:
- What does that error, "Can't get..." mean given that the mailbox exists and it is viewable in Mail for that account?
- Is there some sort of workaround possible?
- Is there some sort of troubleshooting to reveal the mailbox issue involved?
This script is used to work with and filter spam messages in Mail.app. Thanks for any guidance!
MacBook Pro, OS X El Capitan (10.11), Retina Display