Factory reset probably wasn't necessary here, but at least we can confirm the phone is more or less working normally. :-)
There have been others who had issues with imap accounts on this device. Using third party mail apps usually solve the issue.
My suggestion is to open a trouble ticket with HTC on this issue.