How can I prevent Mac Mail from crashing when searching for certain words?

When I search for a word in mail, Mac Mail crashes. It's always the same word and you can search for something else and it's ok. Then it decides to crash on a different word. It's driving me nuts.

YES - I do have a large mailbox and NO I AM NOT GOING TO DOWNLOAD IT ALL AGAIN. That would take more than 2 months internet allowance, so please, suggestions which do NOT involve rebuilding the while mailbox would be appreciated. Thanks.


Its a macbook air M2 (2022) running Sonoma 14.0


[Re-Titled By Moderator]

MacBook Air, macOS 14.0

Posted on Oct 20, 2023 2:51 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 21, 2023 10:14 AM

Solution found for my email crash problem


Hi All - after multiple, multiple calls with Apple Support, I think they have finally solved the issue - at least for me. I am putting in the steps provided to me today below but please understand this is not in my normal wheelhouse and so hopefully does not cause any issues for others if trying. Alternately if you call Apple Support and explain the issue (email crashing when using certain travel related search terms) they hopefully can located this workaround in their system and work with you directly.


In short - what we did was Reindexing the Mail Folders. Following are the steps provided to me from the senior advisor I worked with.


Click on Finder in the Dock at bottom of your screen.

The menu bar at the top of the screen should now show 'Finder'

To the right of 'Finder' - click on 'Go' and look for 'Library' (if 'Library' is hidden - press/hold 'option' key)

Click on 'Library' and look for "Mail' Folder.

Click on 'Mail Folder' and look for a folder that starts with a "V" (mine was V10 but could be a different number)

Click on the "V" Folder and look for "Mail Data" Folder

Click on "Mail Data" Folder and look for any files/docs that start with the word "Envelope Index" (some might also have something else after that like -wal, etc)


If more than one file/doc that starts with "Envelope Index" then hold command key and click on all the files/docs that start with "Envelope Index" until all are highlighted.


Once all highlighted - right click on one and at top of the pop up that should say "New Folder with Selection (xx items) xx = the number of items you have highlighted. Click on that (New Folder...) and all of the files/docs will move into that new folder. Then - and you don't have to do this, but I did to make coming back in the future easer, you can name that new folder. (Mine was simply 'Envelope Files')


At this point, close out of finder.

Finally and this is the part that takes the longest - shut down and restart your Mac.

IMPORTANT - ONCE YOU DO SHUTDOWN AND RESTART, ALL OF YOUR EMAILS WILL FIRST HAVE TO RELOAD AND THEN WILL GO THROUGH INDEXING. THIS TOOK HOURS!


ALSO IMPORTANT - Again I cannot say for certain this will work for others, I just know it worked for me. If uncertain - truly best to call Apple Support/Care and see if they can work you through this procedure!!


Good luck.

96 replies
Question marked as Top-ranking reply

Nov 21, 2023 10:14 AM in response to fairhsa2

Solution found for my email crash problem


Hi All - after multiple, multiple calls with Apple Support, I think they have finally solved the issue - at least for me. I am putting in the steps provided to me today below but please understand this is not in my normal wheelhouse and so hopefully does not cause any issues for others if trying. Alternately if you call Apple Support and explain the issue (email crashing when using certain travel related search terms) they hopefully can located this workaround in their system and work with you directly.


In short - what we did was Reindexing the Mail Folders. Following are the steps provided to me from the senior advisor I worked with.


Click on Finder in the Dock at bottom of your screen.

The menu bar at the top of the screen should now show 'Finder'

To the right of 'Finder' - click on 'Go' and look for 'Library' (if 'Library' is hidden - press/hold 'option' key)

Click on 'Library' and look for "Mail' Folder.

Click on 'Mail Folder' and look for a folder that starts with a "V" (mine was V10 but could be a different number)

Click on the "V" Folder and look for "Mail Data" Folder

Click on "Mail Data" Folder and look for any files/docs that start with the word "Envelope Index" (some might also have something else after that like -wal, etc)


If more than one file/doc that starts with "Envelope Index" then hold command key and click on all the files/docs that start with "Envelope Index" until all are highlighted.


Once all highlighted - right click on one and at top of the pop up that should say "New Folder with Selection (xx items) xx = the number of items you have highlighted. Click on that (New Folder...) and all of the files/docs will move into that new folder. Then - and you don't have to do this, but I did to make coming back in the future easer, you can name that new folder. (Mine was simply 'Envelope Files')


At this point, close out of finder.

Finally and this is the part that takes the longest - shut down and restart your Mac.

IMPORTANT - ONCE YOU DO SHUTDOWN AND RESTART, ALL OF YOUR EMAILS WILL FIRST HAVE TO RELOAD AND THEN WILL GO THROUGH INDEXING. THIS TOOK HOURS!


ALSO IMPORTANT - Again I cannot say for certain this will work for others, I just know it worked for me. If uncertain - truly best to call Apple Support/Care and see if they can work you through this procedure!!


Good luck.

Dec 11, 2023 6:55 AM in response to DexG

Hi all. Just to update on my early post. I cleared the cache manually per the instructions previously posted. This was the second time doing this. And it worked. I can confirm the app no longer quits when searching the various travel related terms. This was on my MacBook Pro 16" M1 Pro 2021 running Sonoma 14.1.1. Now to try and replicate the result on my Mac mini M2...


So it may be worth clearing the cache manually a second time.


Instructions below:

How to clear Mail cache manually

  1. Open the Finder Window and select Go > Go to Folder.
  2. Type in the following and press Return ~/Library/Mail/V8 (you may have a different number after V).
  3. Check through the folders you find here and remove items to the Trash.
  4. Empty Trash once finished and test the Mail app.


Dec 3, 2023 9:26 PM in response to fairhsa2

Here are a few suggestions to try resolving the issue without rebuilding the entire mailbox:

  1. Update Mac Mail: Make sure you're running the latest version of macOS and Mail. Check for available updates by going to the Apple menu > System Preferences > Software Update.
  2. Clear Spotlight Index: Mac Mail uses Spotlight to index and search for emails. You can try reindexing by going to the Apple menu > System Preferences > Spotlight > Privacy. Drag your entire Mail folder into the list to exclude it from indexing, then remove it from the list. This will trigger a reindexing process.
  3. Reset Mail Data: Quit Mail and navigate to the ~/Library/Mail folder. Locate and rename the Envelope Index file to "Envelope Index.backup". Launch Mail again, and it'll rebuild the index file.
  4. Use Smart Folders: Instead of searching your entire mailbox, try creating and using Smart Folders to organize and narrow down your search. Smart Folders allow you to set specific criteria to filter emails based on various attributes.
  5. Use Online Search: If you have your email account set up to sync with an online server, you can try using the web interface of your email provider to perform searches until the issue is resolved.
  6. Contact Apple Support: If the issue persists, reaching out to Apple Support may provide further assistance and troubleshooting steps specific to your Mac and software version.


Jan 16, 2024 2:00 AM in response to fairhsa2

RESULT! 14.2.1 upgrade has now finally fixed the problem on all the search words that caused my mail to crash. Someone said it was creating a conspiracy theory, but there was no denying that all the search names below that caused a crash were travel related. Still think it was related to calendar links somehow. Anyway, hope the new upgrade fixes it for every one else.


Crash words:

hote(l)

check i(n)

checki(n)

boo(k)

confirmatio(n)

appointment(t)

bri(t)ish airways

hom(e)

Sou(t)hwest

Del(t)a

Uni(t)ed

Air(p)ort

Fli(g)ht

Itinerar(y)

Rout(e)

Ticke(t)

Oct 21, 2023 12:44 PM in response to robie_mc

macOS Sonoma user here. The same thing is happening me when I try to type 'Southwest' in the search bar. When I did so slowly, it crashed on the first 't'. So, I did it again and saw that Southwest Airlines popped up as one of the suggestions before I got to the 't'. When I clicked on the suggestion, I got the correct search results and no crash. Very weird. I'm filing a Feedback on this, but I'd be surprised if Apple didn't know.

Jan 4, 2024 1:32 AM in response to fairhsa2

I had this same issue, and like others I have a huge work mailbox and re-indexing is really a last resort.


For me the word was 'Dub' before mail crashes, I was searching for Dublin....


Anyway after some experimentation, turned out it was my Gmail account & I had no issue with deleting that and re-adding. Once re-added the problem went away!


Very bizarre issue.

Dec 1, 2023 2:21 AM in response to fairhsa2

I have the same problem. It is the same whether I search all accounts or go into any account and search from there, which makes me think it is not an indexing problem specific to a single account or email.


Workaround:

  1. Go into Spotlight settings and enable Mail and Messages (if not already - I normally have that OFF).
  2. Bring up Spotlight using Commad-Space
  3. Type your search phrase
  4. Select the email from the search results
  5. Email opens in Mail


Far from ideal - but will have to do for now. I am not reindexing my email as I have a 90GB mail library and it takes a week.

Jul 3, 2024 9:28 AM in response to fairhsa2

Like others are reporting, my Macmail will begin to crash immediately after I make reservations for travel. It only crashes when I search for words associated with my upcoming trip. For instance, when I was about to go to Chicago, it would crash with the letters CHI, or UNI (because I was flying United Airlines). And now that I am about to go to Amsterdam on Delta, it is crashing when I type in AMS or DEL. Also...interesting plot twist(!)...AFTER my travel is OVER...it stops crashing on those search letters and remains fine until I start to book another trip! My guess is that there is something in the email confirmations that is causing the issue. I tried reindexing (like others here are suggesting) before my last trip and, if I remember correctly, it worked. But I don't feel like doing it again. And I know now that the problem will disappear as soon as my upcoming trip is over.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I prevent Mac Mail from crashing when searching for certain words?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.