I just recently had an issue with Apple Mail and Gmail where Mail would indicate that my properly configured IMAP account constantly error’ed out with the error ” ” as shown below.
I was racking my brain around why this wasn’t working. I could telnet into imap.gmail.com so I knew it wasn’t an issue with a firewall or DNS issue. After scouring the web, I cam across a solution. Instead of “imap.gmail.com” use “IMAP.gmail.com”. Go figure.