I'm on a Macbook pro 2013.
I upgraded to El Capitan last night and today my mail client would not send mail. No surprise though because my mail client often has problems staying online and configured if there is a problem on my server's end or with system updates. So, I deleted my configured accounts and began to re-configured them. With the mail client app closed, I tried adding my accounts again through the system preferences with no luck. I received the "could not connect to the server" alert. I then googled and found these instructions and they worked!
http://docs.businesscatalyst.com/user-manual/site-settings/email-users/set-up-em ail-on-apple-mail-mac-os-x-el-capitan
Where the directions say: "4. Enter for Incoming and Outgoing Mail server:mail.worldsecureemail.com "
Make sure to enter your host's mail server not the one mentioned in the directions. Just wanted to note, cause it looks like it wants you to enter what it says in the directions.
I noticed that it might help to add accounts from inside the mail client app while it's open as apposed to outside of the app from the computer's system preferences. I did nothing different while trying to configure my accounts, but only when I added them through the mail client did they connect.
One thing I noticed is that when you go to compose a new message, the message window no longer has the option to choose which account you are sending mail from if you have multiple accounts in the mail client. So that's weird. I've just been making sure that I'm on the right account I need to be on when I compose a new message and I tested that method, it works. But yeah, el Capitan no bueno.