Thanks for the responses :)
When I connect using IMAP, the connection is made but I get an error: 'The IMAP server that manages this mailbox or folder has reported an error during the operation you have attempted to perform. The operation cannot be completed'.
When I try telnet from the command line (which I have never used before) using your example, a new blank window appears. Does that mean it has connected?
SSL is enabled as per the instructions on Google's page
When I create an IMAP profile for the account in MS-Outlook 2003 it works fine.