Apple’s Mail program can connect to a number of different e-mail services, including popular ones like Gmail, Outlook.com, and Yahoo, but in addition be configured for custom IMAP and POP services, such as those at work or educational institutions.
While Mail can manage messages from many different accounts and account types, sometimes an error may occur that results in one or more of the following symptoms:
- Incorrect unread Mail where the number of unread messages does not reflect the total count in the Mail Dock icon badge.
- Incorrect number of messages Where the count of messages seen in Webmail clients do not reflect those seen in Mail.
- Messages not displaying content when selected, and instead showing a blank viewer window.
- Incorrect message content where another e-mail message appears to be showing instead of the selected one.
- Messages you know should be available are simply missing and cannot be found.
These issues may happen because of the way the program handles messages in various inboxes you have created.
For each inbox in Mail, the program uses an index database file that represents the contents of the mailbox. This database contains references that point to the messages on-disk, but otherwise is used to determine what message file is loaded when you select a message, the number of unread messages, and how many messages are in a given mailbox.
Mail relying on this database means that if the database gets damaged, then the symptoms mentioned above may occur, and frustrate your ability to handle messages in your various accounts.
Luckily, Mail includes an option to fix a damaged index file, so you can remedy this problem if it occurs:
- Select the mailbox that is giving you problems, or if you are uncertain which, then hold the Command or Shift keys and click additional inboxes to select more than one.
- Choose “Rebuild” at the bottom of the Mailbox menu