Unable to verify account name or password
I suspect your old password is still in the Keychain; go to Applications > Utilities > Keychain Assistant. Search for your account (usually your email) or the server used. Then doubleclick on the entry and check the checkbox in front of Show Password. Verify that it's the new password which is stored there. It's safe to delete multiple entries of the same account, you should just have one entry.
The background is that Apple Mail.app will first try and use the password(s) stored in the login Keychain and when those fail, it will prompt the user to enter the new password.
See this article on how to manage your Keychain.
Watch out for Two-step verification
If you have Two-step verification enabled most probably this is the reason why isn't working, Mac Mail app doesn't handle well this feature.
The solution:
A. The fast way:
- Go to this page: https://account.live.com/proofs/Manage/additional
- Enter your Microsoft email address and password (if prompted)
- Under "App passwords" section, select "create password" and copy it.
- Go to the Mail app a select "Mail > Accounts..." from the menu.
- Select the email account (Hotmail/outlook) and in the field "Password" paste the password that you copied in step 3
- Hit enter.
- Done.
B. In case you don't trust the previous link, the whole way to get to the page on Option A is:
- Go to your Hotmail/Outlook account in a web browser.
- Select your picture/name in the top right corner and select "View Microsoft Account".
- Select "Security" from the top menu.
- Select "Update Info" in the "Update security info" section (Type your password if prompted).
- Continue on step 3 of option A.
- Done.
This solution allows you to keep you two-steps verification and at the same time use Mac Mail app which is unable to verify your account because of it.
Hope this helps.
I had a similar problem when I changed my email password via the service providers web login. The browser gives the facility to show your password so I could double check I had the correct new password for my Mac Mail client. However, I kept getting the same error 'unable to verify user name or password'.
I contacted the service provider, BT in this instance, for them to confirm there was nothing wrong with my account and I should contact Apple. Despite reminding them that this account had worked fine until the password was changed they had nothing else to offer. So I set about trying another email client on another device, a) using MS Mail and b) Thunderbird on Windows 10. Again I was unable to set up the BT mail account.
In desperation I changed my password once more, this time making sure I only used plain text characters and, hey presto, MS Mail connected, Mac Mail connected and I was back up and running.
The problem appears to be that the login via the web browser seems to accept non text characters e.g. '+' but these somehow do not pass through the same from external clients.
I changed my IMAP and SMTP servers to
IMAP: outlook.office365.com
SMTP: smtp.office365.com
and it started to work.