Get the number of messages in a smart mailbox in Mail.app

I would like to get the number of messages in a given smart mailbox in Mail.app.

Basically, I would like to change the Übersicht Unread Emails Widget (available here ) to show the number of messages (both read and unread) in the smart mailbox I created.

Current code used in widgets:

osascript -e 'tell application "Mail" to set unreadCount to unread count of inbox

      

The biggest problem seems to be with the smart mailbox.

+3


source to share





All Articles