I just had the problem, that I could not send mails over one specific SMTP-Server. I could receive though.
If there is no connection possible to the server, you have different problem.
If you are connected but the wheel keeps spinning, the solution is somewhat stupid.
1) Close Mail
4) Open mail to make sure, the account is gone, and close it again.
5) Check the option for mail in your account preferences again.
After this, you should be able to send mail again.