OSx 10.8.5 Mail 6.6 - Looked online for years trying to find the REAL solution to this issue. Have IMAPed gmail account. Trying to check for mail in a specific folder/mailbox, however Mac Mail always checks all mailboxes regardless of specifying the specific folder.
Currently using a system events work around to select the mailbox via the favorites shortcut key (limited to 9 possible shortcuts/mailboxes). However I would like a more unlimited and direct solution. See typical code below.
tell application "Mail"
check for new mail of mailbox "Mailbox/Folder Name" of account "Account Name"
repeat until (background activity count) = 0
delay 10
end repeat
end tell
Any ideas? Thank you.