How to recover lost Mail content after Yosemite update?
Quit Mail
Find &amp; trash the 3 files in ~/Library/Mail/V2/MailData/ that begin with Envelope Index...
Launch Mail.

That should rebuild the database.

It may not fix your connection issue, but ought to return the missing data.  

To fix the connection, try unchecking 'Automatically detect &amp; maintain..." in Prefs > Accounts > SMTP Settings/Edit