Often problems with passwords in Mail are a result of issues in your Keychain Access.app. Open Keychain Access in Applications/Utilities. Find the entires for your email account.
Look for a blue symbol with @. You can enter your account name in the top filter on right to help find all the entries. Keychain doesn't delete old or duplicate entries. Delete all entries for the email account.
Open Mail
Enter the password in the incoming and under SMTP for outgoing.
Under Window in the Menu bar, select Connection Doctor
If you see a red symbol for incoming, you need to enter the password again in the Account window.
If you see a red symbol for outgoing (smtp) you need to edit SMTP settings.
All email accounts have passwords. If you don't remember your password you will need to contact your provider to reset. Save the password!
Add password for incoming:
Open Mail Preferences > Accounts
Select account > click on the Account Information tab
Enter password under the server section.
Click out of the window to save settings. IMPORTANT
Click back to select the account to select edit SMTP setting.
Add password for outgoing:
EDIT SMTP SETTINGS
In Accounts window > Outgoing Mail Server SMTP: select to Edit SMTP Server list... from popup.
Select account in the list.(It's not uncommon to find extra SMTP servers listed. When you remove account, Mail does not delete the smtp info. You might need to do some clean up in the list to remove the extras.)
Under Advanced Tab:
Apple defaults to the default ports (25,465, 587) but some servers prefer a custom port. Check to see what port they recommend. Gmail for example likes 465, Outlook.com 587.
Verify if your server require SSL.
User Name. Enter full email address eg. UserName@gmail.com
Add password if it is blank.(If you have two step authentication setup, you'll need to get an app specific password
Open Connection Doctor under Window in the Menu bar.
Do you see green light now for your account SMTP?