I'm using El Capitan now...but this problem existed with Yosemite too.
I keep getting error messages that say either could not connect to server or the server returned the error: Connections to the server “imap-mail.outlook.com” on the default ports timed out...sometimes it's saying that my trash cannot be emptied, other times it says a piece of mail could not be moved to trash.
If I open connection doctor on my original account, it shows two types of connections for each (gmail and hotmail) of my webmail accounts (SMTP and IMAP); for this, I have no idea why! I set up each of these accounts though the mail app, so I did not add them manually that their should be two types of account for each, as I did not choose the type - they are predetermined by the app.
I spoke with Apple about this and a few other issues a couple weeks ago, and the tech suggested that when I had Apple transfer some files onto this new Macbook from a Windows 8 computer, that something potentially got transferred that was a WIN8 file, that ends up corrupting mail. Didn't make much sense to me sense these are webmail accounts and not discrete files, but what do I know.
He told me to open a new user on the Macbook (as guest user deletes upon shutdown), then open up the mail accounts the same way through the Mail app, and that should fix it. I've now done that, and still...same problem except now, it's not showing two types of webmail for each account, just IMAP. But it currently won't sent the mail I just drafted and i just got the server timed out message.
Since they are webmail accounts, I could just access them online, but I want the organizational features of having them in one place, merging calendars, etc.
Any help, even an affirmation that this is a bug that others are experiencing, would be much appreciated. I really thought this was an OS X problem and hoped it would be fixed with the release of El Capitan, but no love.