1

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.

Seek Truth
  • 143
  • 7
  • Does this script still work for you? When I try to use `background activity count` I get an error message, see https://stackoverflow.com/questions/74249201/applescript-mail-apps-property-background-activity-count-is-broken – d-b Oct 30 '22 at 08:07
  • Sorry, haven't used in years and we are way past OS 10.8 – Seek Truth Oct 31 '22 at 14:35
  • The same code SHOULD still work, but I just get an error message. Am interested in if others have the same problem. – d-b Nov 01 '22 at 16:31

0 Answers0