Preferences -> Accounts -> Advanced
There should be a box that says "Use SSL." Change it from 993 to 995.
(Unchecking it is a really bad idea although it might "fix" your problem.)
Also, this is just something that a lot of public WiFi spots block. Some of them only allow port 80 (which is what's normal for web stuff), breaking IM clients, mail clients, and so forth. In such situations it's easier to just temporarily use webmail.