"I found another forum post on here regarding the same issues with IMAP, and the solution was to uncheck the option under mail preferences -> accounts -> advanced -> and UNCHECK "automatically detect and maintain account settings". I unchecked for all accounts, closed and reopened mail, and every email that has come in to these accounts since I installed Yosemite finally all downloaded. Hope it works for others as well."
I hadn't see your suggestion until after I had tried it as well, but I also (randomly) unchecked "automatically detect and maintain account settings" just to see what it would do, and my mail began sending immediately. I didn't even have to restart the mail client. I didn't change anything else. Just unchecked that box and everything started working. (note--I'm using the default mac email client) . Also, the box rechecked itself on its own and everything is still functioning fine. Hope this works for others.