Before configuring Windows Mail, be sure to enable IMAP access and to do other necessary actions in your Gmail e-mail account. For more details see Configuring you Gmail account.
To configure Windows Mail
2. On the Tools menu, click Accounts.
3. Click Add.
4. Click E‑mail Account, and then click Next.
5. Enter your name as you would like it to appear in the From: field of outgoing messages, and then click Next.
6. Enter your Gmail e-mail address, and then click Next.
7. Fill in all necessary fields to include the following information:
Incoming e-mail server type: IMAP
Incoming mail (POP3 or IMAP) server: imap.gmail.com
Outgoing e-mail server (SMTP) name: smtp.gmail.com
Outgoing server requires authentication: enabled
8. Click Next, and then enter your full Gmail e-mail address under E-mail username and your Google password under Password. Click Next.
9. Check the box next to Do not download my e-mail at this time, and then click Finish.
10. On the Internet Accounts screen, make sure that your imap.gmail.com mail account is selected, and then click Properties.
11. On the Servers page, under Outgoing Mail Server, make sure that My server requires authentication box is checked.
12. On the Advanced page, enter 465 in the in the box next to Outgoing mail (SMTP), and check the box next to This server requires a secure connection (SSL).
13. Check the box next to This server requires a secure connection (SSL) under Incoming mail (IMAP). The box next to Incoming mail (IMAP) should be automatically updated to 993.
14. Click OK. You're done! On the Internet Accounts screen, click Close.
15. Now, select Yes to download the list of Gmail folders to Windows Mail.