Many clients will automatically configure the appropriate IMAP connection settings for your account, but confirm that the connection settings your client configures are the same as what's listed below.
If you're using a client that's not listed above, you can also use the following information to configure your IMAP. If you have problems, contact your mail client's customer support department for further instructions.
Incoming Mail (IMAP) Server - Requires SSL
imap.gmail.com
Port: 993
Requires SSL:Yes
Outgoing Mail (SMTP) Server - Requires TLS
smtp.gmail.com
Port: 465 or 587
Requires SSL: Yes
Requires authentication: Yes
Use same settings as incoming mail server
Full Name or Display Name: [your name]
Account Name or User Name: your full Gmail address (username@gmail.com). Google Apps users, please enter username@your_domain.com
Email address: your full Gmail address (username@gmail.com) Google Apps users, please enter username@your_domain.com
Password: your Gmail password
If your client does not support SMTP authentication, you won't be able to send mail through your client using your Gmail address.
Also, if you're having trouble sending mail but you've confirmed that encryption is active for SMTP in your mail client, try to configure your SMTP server on a different port: 465 or 587.