sent, outbox, reply, flagged email gone. Also sidebar mailboxes in mac mail also gone
Upon opening mac mail, all mail downloaded and inside "inbox" disappeared. All sidebar mailboxes also disappeared. All "sent" emailed disappeared. All flagged "emails" disappeared. Every single reply I sent to received emails was also gone, with the error message: "Mail was unable to find your reply in message '...' You may have deleted that message."
I'm on Mohave 10.14.6.
What I tried:
I thought finding and restoring all the sidebar mailboxes would fix the problem. So I created a new folder in sidebar called "mac mail problem." Then I went to user-library-mail-v6 and found the folder that now contained "mac mail problem." Then I quit mail. Then I trashed the 5 "envelope" files in "mail data" folder in V6. I opened time machine backup, hoping to restore the folder in the backup which contains the mailboxes. The folder did not exist in the backup. I assume mac mail created a new folder and the indexing is screwed up. I restored what I could from back up. Moved the mailboxes into the current mac mail folder in user-library-mail-v6. When I restarted mac mail, it re-indexed. Result: mailboxes appear in mac mail, but all sent, flagged, replied email are still gone.
Also, I tried "rebuild" action in mac mail.
Please help. Any insight appreciated.
MacBook Pro 15″, macOS 10.14