Gmail Configuration

Published on November 20, 2019 at 10:53:00 PM GMT+8 by Administrator

This article contain the instruction on how to configure office Gmail account


Gmail Configuration

Having problems getting Gmail to work with your custom email client? Try these settings.

» Email sending

To send emails using Gmail server enter these details:

SMTP Host: smtp.gmail.com
SMTP Port: 587
SSL Protocol: OFF
TLS Protocol: ON
SMTP Username: (your Gmail username)
SMTP Password: (your Gmail password)

Also make sure your "From email address" in settings is set to your Gmail email address!

If you get an error from Google you might also need to enable "less secure apps" in your Google account.

Still no luck? Check with your host if they have port 587 blocked in firewall.


» POP3 fetching

To fetch mail from Gmail server enter these details:

POP3 Host: pop.gmail.com
POP3 Port: 995
TLS Protocol: ON
POP3 Username: (your Gmail username)
POP3 Password: (your Gmail password)

Important: make 100% sure that "POP3 download" in your Gmail settings is set to "Enable POP for mail that arrives from now on". If not, Gmail will send all existing (even read) messages to your client when it first connects.


» IMAP fetching

To fetch mail using IMAP from Gmail server enter these details:

POP3 Host: imap.gmail.com
POP3 Port: 993
Encryption: SSL
POP3 Username: (your Gmail username)
POP3 Password: (your Gmail password)


» Error messages

Connection timed out

Required ports are probably blocked on your server's firewall. Ask your host to configure the firewall to allow TCP connections on ports 587, 995 and/or 993.

Some hosting companies will not do that due to their policies. In that case you will need to, in order to integrate Gmail with your custom client like "Windows Mail".


Permission denied

Try logging with your google account here to unlock it for application access.

Click the "Continue" button to Allow access to your Google account.


Password error: [AUTH] Username and password not accepted.
Too many login failures


Error: 0 could not connect to the host "pop.gmail.com"

This could mean that:

  • required ports are blocked on your server's firewall. Ask your host to unblock TCP connections on ports 587, 995 and/or 993

- OR -

  • SSL certificate verification fails on your server. Try this:
  1. download this file
  2. save it somewhere to your server, for example to C:\wamp\ssl\cacert.pem
  3. open your php.ini file
  4. find line
    ;openssl.cafile=
    and change it to the location of the cacert.pem file while also removing the starting ; 
    openssl.cafile=C:\wamp\ssl\cacert.pem
  5. save and restart the server
  6. test again