Hi,
To restore local Apple Mail data from a Time Machine backup, you need to extract your hidden library files and import them into the Mail app.
Step 1: Open the Hidden Library Folder
- Connect your Time Machine backup drive to your Mac.
- Open the Finder.
- Click Go in the top menu bar, then press and hold the Option key to reveal and select Library.
- Open the Mail folder. Note the version folder inside (such as V10 or V11, depending on your macOS version).
Step 2: Enter Time Machine
- Keep the Mail or VXX folder open in Finder.
- Click the Time Machine icon in the menu bar and select Enter Time Machine.
- Use the timeline on the edge of the screen to go back to a date before the local mail was lost or deleted.
- Select the relevant Mail or V-folder (or specific account/mailbox subfolders) and click Restore.
- Tip: Choose to restore the data to your Desktop or Downloads folder rather than overwriting your current live mail files directly.
Step 3: Import into the Mail App
- Open the Apple Mail app on your Mac.
- In the top menu bar, click File > Import Mailboxes.
- Select Apple Mail (or "Files in Apple Mail format") and click Continue.
- Navigate to the restored folder on your Desktop or Downloads, select the mailboxes or .mbox files, and click Continue / Choose.
- Look in your Mail sidebar under the On My Mac section to find your newly imported folder, then drag and drop the messages back to your preferred location.
If you'd like to share which version of macOS you are running or whether these were IMAP or "On My Mac" local folders, I can give you more exact steps.