For non-Gmail clients, Gmail supports the standard IMAP, POP, and SMTP protocols.
The IMAP server is imap.gmail.com and it is using the port 993.
The POP server is pop.gmail.com and it is using the port 995. It requires SSL.
The outgoing SMTP server is smtp.gmail.com, and it requires TLS.
Use port 465, or port 587 if your client begins with plain text before issuing the STARTTLS command.
IMAP, POP, and SMTP use the standard Simple Authentication and Security Layer (SASL), via the native IMAP
AUTH, and SMTP
AUTH commands, to authenticate users. The SASL XOAUTH2 mechanism enables clients to provide OAuth 2.0 credentials for authentication.