3. You’ll need to edit the file /etc/hosts (use a VI or a VIM editor for this)

4. Without deleting the anything from the file, append the following two lines:
72.14.213.109 imap.gmail.com
74.125.53.109 smtp.gmail.com
(If the IP address you found was any different from the ones I’ve mentioned, replace it with the same.)

5. Save the file and exit the editor

6. Launch the Email application on N900. Follow the wizard that it shows by selecting Gmail in the list of providers that it shows.

7. Enter your user name and password and go till you click finish.

Once you are done with all these set up, you connection should work fine, else have a look at the screen shot below and try to get your settings to match as shown in the screenshot.