Does anyone know one can use AppleScript to expand folders of an account in the Apple Mail sidebar? If you hover over an account, a disclosure triangle appears. Clicking on it opens the list of folders in the account if closed, or closes the list if it’s open. Specifically, I would like to write an AppleScript to close it if it is open.
Let’s say I have 5 enabled accounts in Apple Mail. I want to ensure that they’re all closed.