Several people have had the same problem, no one single cure that I've seen. :(
Quit mail.
Finder>Go>Go to Folder, copy & Paste:
~/Library/Containers/com.apple.mail
Highlight all the contents.
Then right-click and choose "New Folder with Selection”. Do not move the new folder from this current location.
You can close the Finder window.
The next step will be to restart the Mac and test
Cant create re add Mail
James Walker1
User level:
Level 1
(129 points)
Notebooks
Speciality level out of ten: 0
Mar 1, 2019 10:39 AM in response to if240
I was having this problem trying to add a mail (not gmail) account just for Notes. In my ~/Library/Keychains folder, I found a subfolder with a long hexadecimal and hyphens name. I deleted that subfolder, logged out, and logged back in. I was then able to add the account, without having lost any passwords from my keychains.
Possible eMail fix…
https://discussions.apple.com/thread/8393897?answerId=250408740022#250408740022
Or start over with Mail…
Quit Mail.
In the Finder, hold down the option key and select
Go ▹ Library
from the menu bar. Move the following items from the folder that opens to the Trash (some may not exist):
• Caches/com.apple.mail
• Saved Application State/com.apple.mail.savedState
• Application Support/AddressBook/MailRecents-v4.abcdmr
• Containers/com.apple.mail
• Mail
• Preferences/com.apple.mail.plist
• Preferences/com.apple.mail.searchhistory.plist
Note: you are not moving the Mail application. You’re moving a folder named “Mail.”