Email problem; Connection dropped by imap

Whenever I try to log in to ehcp mail, I get something that says "connection dropped my imap. What's happening?

your imap server, courier-imap is not working..
check your server and logs,
try to reinstall imap server.

try this:
go to ehcp gui, options-> fix mail config.

Ehcp General Problem Solving Guide:
Howto Debug ehcp: