Mail in OSC can be very stubborn about forgetting older passwords.
Have you changed your eMail password lately?
Works sometimes even if you haven’t
Open Keychain Access in Utilities, then either check the Password under that item, change it, or delete it and start over.
Enter the part after the @sign in the search bar.
You may have duplicate or more entries in Keychain Access.
If using a browser to login via WebMail works it's not Name or Password, but likely old passwords interfering.
There''ll be at least 2 entries, maybe more.
The trouble is that Mac Mail almost always chooses the old Passwords if you don't change or get rid of the old ones.
Restart to clear some caches.
The big bugaboo with Mail is finding the keychain for any auto setup Mail accounts, if IMAP it usually involves deleting the account & setting it up again to fix it.
Cant create re add Mail
James Walker1 User level:Level 1 (129 points)
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.
If gMail not commenting…
https://support.google.com/accounts/answer/2544838?co=GENIE.Platform%3DDesktop&hl=en
https://myaccount.google.com/permissions