PHP mail form not relaying mail to Google Suite remote mail server?

I have exhausted every option I can think of for setting up my remote mail server (G Suite), I’ve gotten support from Google, Cpanel and other sites with no help. Basically I have set up my Droplet from scratch (CentOS 7), configured my name servers, installed Cpanel/WHM, configured CSF firewall, installed an SSL certificate… literally all of those things are set up properly and work just fine but I cannot for the life of me get Google Suite email to work with my PHP mail form on my website; it doesn’t send the email successfully to Google’s mail servers, I get the following error in the email logs: “The mail server could not deliver mail to The account or domain may not exist, they may be blacklisted, or missing the proper dns entries.” I can send email just fine normally to and from the G Suite email, just not from the PHP form submission.

The domain is new and not blacklisted and the DNS entries seem correct.

Here is a list of everything I have tried:

  1. Configure EXIM to work with G Suite
  2. Configure Google’s Admin settings to work with SMTP and my website’s server
  3. Disable firewall and test form
  4. Change email for form to different service other than google
  5. Configure DNS names including SPF, A, MS, etc.

What the problem might be (what I haven’t gotten help for)

  1. Configuring PHP (confused on what I need to do for CentOS 7 and Cpanel/WHM)
  2. ??

At this point I may just give someone my credentials to login and see what I am missing.

Here are some guides I have already followed:

Please help


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


If disabling the firewall does not work (i.e. all ports are open), I’d create a new support ticket so we can check your account to see if there’s an SMTP Block in place. From there, we can work with you to get that removed and then you can retest to see if that resolves the issue :-).