The SMTP settings are separate from the POP or IMAP settings within Mail.app (which can be a little confusing), and the SMTP settings are incorrect. That could be some combination of the username or password, the SMTP server name, the TCP port, whether or not SSL is in use or not. It's more common to have SSL enabled. All have to be correct. The required SMTP server settings do vary by mail provider, unfortunately. You can use Connection Doctor to get more details on the particular error; Window > Connection Doctor, then open the drawer for a look at additional details. If you're not able to resolve the error from that output and from the mail provider's available documentation, and establish the connection, please scrub any personal details from the detailed diagnostics, and post that output here.