|If Lately, the Apple Mail, has been acting up a lot such, that when it tries to sync with your mail server and just hangs up and uses all available CPU, the only remedy is to Force Quit Apple Mail (if you don't know, just press the "Apple Key (cmd) & Alt (option) & Esc and you get a handy dialog to force quit any running application).
How to get Apple Mail running healthy again? Here are the following steps:
Actually, repairing permission should be done at least once a month. It just keeps your system healthy and rules out any problems. What "Repair Permissions" does, is to simply correct all permissions on files that system owns and needs to run smoothly. To repair permissions lunch the Disk Utility application, select your startup disk and click on "Repair Permissions".
Remove the cache files of Apple Mail:
If you see a problem with syncing and updating the cache directory within Mail it could be that the cache files are corrupt. Go to your home Library folder, then to the Mail folder and remove the "DefaultCounts", "Envelope Index" and the "LSMMap" files. Some have reported that removing the "MessageUidsAlreadyDownloaded" as well. So you will have to experiment a bit.
The next time you start up Apple Mail it should ask you to reimport all messages and it will rebuilt the index. Hopefully, you are back up and all is well.