I have several empty mailboxes On My Mac. I right-click on them, select delete mailbox, get the warning dialog box, select delete. Mailbox still exists. How do I get rid of them?
I had the same issue, I must've clicked "delete mailbox" 10 times in a row, and it didn't disappear.
Here's how to fix it:
Click on "mail" on the top left part of the screen. Click "preferences." The Accounts menu should come up. On the left, you'll see all the mailboxes. Click the mailbox you want to delete, and then
click the "-" symbol on the bottom of the accounts menu. This permanently gets rid of any trace of that pesky unwanted mailbox.
That list *_does not_* show mailboxes, it shows
accounts. If you delete one of those accounts, you'll lose all the mail in all mailboxes associated with that account (unless those messages are still stored on the server), as well as no longer being able to send or receive mail using that account.
As to the error, I'm not sure what it could be... possibly a permissions problem in the folder where Mail stores the mailboxes. "On My Mac" mailboxes should be stored in ~/Library/Mail/Mailboxes/ (where the '~' means "your home folder"). You could try quitting Mail, then moving the affected mailbox from there into the trash in the Finder. Start Mail again and the mailbox should be gone. If something goes wrong, just quit Mail and move the mailbox back from the trash to where it was. And, of course, it's always a good idea to have a good backup whenever trying something potentially destructive like this!