I've been working on my On_My_Mac handler (below) yesterday afternoon and all this morning. I haven't been able to improve on the old original, but I did make some minor changes. I did discover, using
set mboxName to (name of selMailbox)
that:
The Inbox is named "Inbox" and its sub-mailboxes are named "INBOX";
The Sent mailbox is names "Sent" and its sub-mailboxes begin with "Sent Messages";
The Trash mailbox is named "Trash" and its sub-mailboxes begin with "Deleted Messages";
The Junk mailbox is named "Junk" and its sub-mailboxes begin with "Junk";
The Drafts mailbox is named "Drafts" and its sub-mailboxes begin with "Drafts".
Mailboxes "On My Mac" have no account.
(But I have encountered error messages that seem to refer to an "On My Mac" account.)
And now my question: Isn't there a simple way to determine if a mailbox is "On My Mac"?
(I've been looking for a long time, but have found nothing.)