In general, this means that some part(s) of your SMTP server setting(s) within the account don't match the requirements at Yahoo. The target SMTP server isn't the correct host name, the port is wrong, whether or not SSL is required is incorrect, or the username and/or password is incorrect.
Here is the detailed Yahoo setup document and here is the short version:
The SMTP server address is smtp.mail.yahoo.com The user name us your full Yahoo! Mail email address including the domain "@yahoo.com" or whatever Yahoo domain you're using. The SMTP server password is your Yahoo password. The TCP port is 465 (one of the default ports in OS X Mail.app client), and SSL/TLS is required.