Enter the User Information and Logon Information. Then, type the Server Information as given below;
Next, select More Settings and, under the General tab, tick the SMTP authentication.
Click on the Advanced tab, and input the port numbers and encryption type as mentioned below;
or
Save the changes and click Test Account Settings.
Check the option below the Test Account Settings button and click Finish to complete the Gmail IMAP and SMTP settings.