Under Windows in the Menu bar select Connection doctor. You will see green to indicate a connection and red to show there is a problem. You can click on more details button, but with multiple accounts this is often hard for some users to read result. Except for iCloud account you'll see two entries for each account 1) receiving and 2 SMTP for sending.
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.
Most servers require SSL but you should verify your account requirements. Gmail, Outlook.com, Yahoo and AOL all 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 more info)
Open Connection Doctor under Window in the Menu bar.
Do you see green light now for your account SMTP?