1- Remove Expired Certificates or Old Passwords Archived in Keychain on Mac
If your mail remains inaccessible due to the unable to verify account name or password error, check the Keychain to erase obsolete data. Delete any terminated or annulled certificates along with existing password duplications from the Keychain.
From Applications, launch Keychain Access and search for the entry based on the connections you use like here. Next, go to Mac mail and confirm your email, a password prompt will appear. Type the exact password in the account password field and enable “Remember this password in my keychain”.
2- Feed Email Password in System Preferences
If you changed your Keychain password before, it may cause the verification problem. To fix the "unable to verify account name or password" issue in the Mail app, you need to authorize the account in System Preferences by following these steps:
a) Open System Preferences and click on Internet Accounts.
b) On the left side, select the account that requires validation, and a password prompt will appear.
c) Click Cancel to view a comprehensive list of archived email accounts.
d) Enter the password in the blank fields and press the Tab key to move to the next field.
e) The system will verify your account as long as you enter the correct password. This same method can be used to confirm email accounts.
3- Re-add the Email Account
One way to fix the "unable to verify account name or password" issue is to delete and then re-enter the email details in the Mail app. This will remove the email cache from the system but preserve any attachments and data stored on the email server.
4- Delete the Email Account from the Mail.app
a) Open the Mail app.
b) Click on the "Mail" option in the top menu and select "Preferences" from the drop-down list.
c) Select the email account you want to delete from the left sidebar, and click on the "-" button at the bottom.
d) Click "OK" to finish the process.
5- Delete the Email Account from System Preferences
a) Launch System Preferences and select "Internet Accounts".
b) Select the email account you want to delete and click on the "-" button at the bottom.
c) Click "OK" to finish the process.
d) Restart your computer after the deletion.
d) To reintroduce the email account to the Mail app, go to System Preferences > Internet accounts or Mail App > Mail > Accounts.
6- Deactivate Two-Step Verification Security
Email service providers like Gmail, AOL, and Yahoo offer a Two-Step Verification process for added security. However, this feature may cause issues with certain email applications being unable to authenticate the account and password. To address this problem, it is recommended to temporarily disable this security feature and verify the email account, then re-enable it once the issue has been resolved.
7- Restart Your Computer
To solve the "unable to verify account name or password" issue, one of the easiest solutions is to restart the machine and launch Safari. This will generate new folders in just a few minutes. To do this, hold down the Shift key immediately after hearing the startup chime until the gray Apple icon and a progress bar appear. Although rebooting may take longer, it will refresh caches, launch a directory screening, and deactivate all login items, among other things.
8- Update iCloud Keychain
Make sure to turn off iCloud Keychain in all of your devices. After, enable iCloud Keychain that has up-to-the-minute Keychain items. Activate iCloud Keychain on the other devices. This updates the other devices with the new iCloud Keychain.