Apple - Mail.app crashes constantly, even after deleting mail profile and cache
Changes per OS...
Since Sierra, Mail is in V4
Since El Capitan, Mail is in V3
All the rest will be the same.
If your machine has been upgraded through these OSes, you may have all 3 folders.
Try clearing the saved state, rebuilding & reindexing the database...
Clear Saved State
- Switch to Finder, Cmd ⌘ N for a new window, then Cmd ⌘ Shift ⇧ G for Go To...
- copy/paste
~/Library/Saved Application State/com.apple.mail.savedState
then Enter ⌅ - This is an alias to the real location, so Right-click & Show Original
- Delete the entire
com.apple.mail.savedState
folder.
Rebuild; Re-index
Source: How to fix Apple Mail by rebuilding and reindexing the Mailbox
Step 1: Rebuild
Rebuilding a Mailbox in Mail sounds daunting but it really isn't.
- Launch Mail, select one of your mailboxes and click on the Mailbox menu. At the bottom of the pane choose the Rebuild option. If you have a large mailbox, you can expect the process to take a few hours.
- You must repeat this step for each one of your Mailboxes.
- While the process takes place, you may experience system performance lag, as it can consume a lot of system resources and memory.
Another caveat, if you use IMAP or Exchange with any of the accounts, the process will redownload every message from the server, so you'll use a lot of bandwidth.
Now that you've completed these steps, work with Mail a little longer. If you are still having issues, or Mail fails to launch, you should try a manual reindex.
Step 2: Re-index
Manual reindexing of Mail messages is the only way to go if the application has become so unresponsive it barely works at all, search is not functioning correctly or the app won't launch.
Mail will automatically attempt to reindex your messages if it detects problems with the mailboxes, but sometimes a manual reindex is the best option. If you are still having problems with Mail after following step one, try manual reindexing.
- Quit Mail if it’s open.
To get to your home Library folder, hold down the Option key, then in the Finder choose Go > Library.- In
~/Library/Mail/V2/MailData
, delete any file that begins with “Envelope Index,” such as Envelope Index or Envelope Index-shm. (Before you actually delete the files, it makes sense to copy them to a folder on your desktop.)- Launch Mail and the app will build new Envelope Index files -- this can take a long time if there are numerous messages to go through.
- If everything seems to be working correctly, you can now delete the copies of the "Envelope Index" files from your desktop.
In most cases, these two tips should solve most Mail problems
My was crashing when I added Google Accounts, and the reason was, in one of the Google Accounts, I had created Mail Labels with slashes in their names i.e "/label_name/" and this was confusing the the Mail App to think it is a file path on the file system. I renamed my email labels, removing the slashes, and it stopped crashing!