That's because POP with SSL uses port 995. IMAP with SSL uses port 993.
Have you double-checked ALL your settings (type = POP or IMAP, server names (pop.gmail.com vs imap.gmail.com), SSL or not, port nos.) against
this? Actually , I like
this one better because it details port numbers more clearly, even though it was written for Tiger Mail. But the info is still all good. I think that if you want an IMAP, you have to tell gmail on some account configuration page that you want the account to be IMAP.
At any rate, the fact that you have specified a pop server with an imap port number leads me to believe that this could be the cause of your gmail problem.
Couldn't find much for mobileme. Found some PC setup stuff
here, server info the same, as is the case for port numbers, regardless of platform, but it didn't delve into port numbers. Generally speaking, port numbers are usually:
Receiving mail
IMAP with SSL: 993
IMAP without SSL: 143
POP with SSL: 995
POP without SSL: 110
Sending mail
SMTP with SSL and/or with authentication: 587 or 465 or 25 (provider's choice)
SMTP without SSL or authentication: 25 (usually requires you to be on the same network as the mail provider because they will authenticate your identity off your IP address)