If anyone hasn't found a solution to this in any of the other solutions listed here (which I didn't) it may be the same issue that I had. In the smtp list I had the user name as just the first part of the email eg. 'info' instead of the whole email address: 'email@example.com'
As soon as I changed this it worked fine.
I recently had trouble with stmp outgoing on Mavericks (as of June 1, 2014) with both a gmail-based server and outlook-based server. I simply clicked the "Edit STMP Server List" from the pulldown menu, selected "None" for Authentication, and then reselected "Password." At this point, the username and password boxes were cleared, so I had to retype them. Once I did that, the outgoing servers went online. Maybe selecting "None" is an unnecessary step, and I think the most important part was retyping the password. Nevertheless, that's the exact process I took. Hope this helps.
I was also having the same issue, the first part of this fix which I got from Google seemed to work where others had not. I didn't have to change my SMTP server settings but I've left it in for completness.
"If you tried configuring your SMTP server on port 465 (with SSL) and port 587 (with TLS), but are still having trouble sending mail, try configuring your SMTP to use port 25 (with SSL).
Apple Mail users: At times, Mail may misinterpret your SMTP server settings. If you currently have 'smtp.gmail.com:firstname.lastname@example.org' in the 'Outgoing Mail Server:' field of your settings, please try changing the field to 'smtp.gmail.com' and saving your settings."
Unable to send emails from any of the three accounts on Macbook Air, which is running Mountain Lion 10.8.5. All 3 smpt servers showing offline. Working absolutely fine until a few days ago, when I used a hotel Wi-fi. I failed there and when I got home a day later. No updates installed and nothing changed.
Still working normally on my iMac, my iPad and my iPhone with the same settings.
I have followed many threads and done all the things suggested (delete and re-enter account, delete keychain entries, delete and re-enter passwords, specify ports. delete com.apple.alt.plist, delete apple.mail.plist etc....) all to no avail. Finally re-booted the router and BINGO off went the email BUT within a few seconds, all accounts offline again. About the only thing I haven't done is re-install mail - a step too far with my limited knowledge and understanding.
The fact that this thread had 117,514 views yesterday and has grown since, says something on its own.
Very frustrating and not what users expect from apple.
Perhaps install Mavericks? - Maybe not, the threads are not encouraging.