Since the El Capitan upgrade, I have been having the same problems with Mail (which IMHO has always been really buggy, but I digress...)
My problems are with sending from non-iCloud accounts - Mail keeps forgetting the outgoing mail server settings for two IMAP accounts after I have quit, so that I can't send e-mails, and either get a dialogue box popping up, or the mails just sit in the Outbox with no error messages....
The fix is relatively easy, just frustrating...
Open Preferences
Select Accounts, and the relevant IMAP account
Outgoing Mail Server may be blank, or it may have the correct domain in it, but click on it anyway, and select 'Edit SMTP Server List..."
Click Advanced
Untick the "Automatically detect and maintain account settings flag" so it is blank
Click Authentication, which may say none, and select "password"
Enter user name (in my case the e-mail address)
Enter the password again (I have taken to having them written on a post-it, this is happening so often)
Click OK
It all works again now, but Mail will forget this as soon as I quit (which I sometimes have to do because of other buggy behaviour).
Hope this helps someone, and here's hoping for a proper fix at some point.
p.s. iCloud also seems to have been a bit flakey since the upgrade too, but I haven't tracked that behaviour down just yet.