There are some common issues that you may experience when first sending emails to Gmail from your cPanel Server.
Are your emails marked as spam?
When sending emails to Gmail for testing, review whether or not emails from your domain or server address the Inbox or Spam folder. If the domain sends messages to spam, please see the section regarding "Has your server been sending unsolicited emails?".
Is port 25 open?
It is common for hosting providers to limit traffic on port 25. To test whether or not port 25 is open, you could utilize the telnet utility:
telnet gmail-smtp-in.l.google.com 25
If the connection to gmail-smtp-in.l.google.com times out, then we recommend reviewing whether or not the port 25 is open on your server. Our documentation on Firewall Management provides some suggestions, or the hosting provider of your server could assist.
Does your domain have valid SPF and DKIM records?
Google generally requires working SPF and DKIM records on your domain name. An example of an error that you may receive in your Exim Logs due to authentication would be:
1970-01-01 17:16:13 1xxXxX-000XX-Xx ** email@example.com R=dkim_lookuphost T=dkim_remote_smtp H=gmail-smtp-in.l.google.com [184.108.40.206] X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=yes: SMTP error from remote mail server after end of data: 550-5.7.1 This message does not have authentication information or fails to pass\n550-5.7.1 authentication checks. To best protect our users from spam, the\n550-5.7.1 message has been blocked. Please visit\n550-5.7.1 https://support.google.com/mail/answer/81126#authentication for more\n550 5.7.1 information. z20si18289834pfd.204 - gsmtp
If your domain points to your cPanel server, you can review the "Email Deliverability" interface within the user's cPanel account. The interface shows the intended SPF and DKIM record for your domain name, and leave for you to install it.
If your domain uses external nameservers, you could use the records from this interface and add them to your DNS Zone File.
Has your server been sending unsolicited emails?
There are cases where domains hosted on a server may start sending unsolicited emails. Whether through a compromise or poor handling of emails, Google may block these messages and deem that the server has a poor reputation. An example of a bounceback message that you may receive would be:
We recommend the use of Google's Postmaster Tools to monitor the domain's sending history. Google's Postmaster Tools provides the Administrator of the server a better understanding of why Google blocks the server's messages.