If you are starting the Microsoft outlook 2010 for the first time, you will be seeing the following start up screen, just click Next and choose Yes in the next screen where they ask would you like to configure an email account?
Note: If you already have another email account or if you have chosen No in the earlier case and has already gone through the initial outlook start up settings before, follow this screenshot else continue to the next one.
Click the Office button on the top left corner and go to the Office Backstage. Under Info –>Account Information –> Click Account Settings and Click on Add Account.
On the Add New Account screen, just choose Manually configure server settings or additional server types and click Next.
Choose Internet E-mail, connect to POP or IMAP server to send and receive e-mail messages and click Next.
Here give the User information, enter your Name, your full email address email@example.com
Under Server information,
Account Type – IMAP
Incoming mail server – imap.gmail.com
Outgoing mail server (SMTP) – smtp.gmail.com
Also enter the logon information, enter your user name in full and enter the password.
NOTE: Now don’t click Next yet, click on More settings above it.
In the Internet email settings, go to Advanced Tab to change the server port numbers.
Change Incoming server (IMAP) to 993 and use SSL as the encrypted connection.
Change outgoing server (SMTP) to 587 and use TLS as the encrypted connection.
Now go to Outgoing server tab and check My outgoing server (SMTP) requires authentication and choose Use same settings as my incoming mail server.
Now you should be taken back to the Add new account screen, click on Test Account Settings and see if everything works without any errors. If there are any errors go back to all the settings and recheck if you have entered correcly.