Configuring SMTP Authentication for Sending Emails via a PHP Script

cjoel

Registered
Aug 3, 2017
3
0
76
California
cPanel Access Level
Root Administrator
I need help with configuring SMTP Authentication for sending emails via a PHP Script (form). I'm using the Gsuite for email and I can send/receive emails correctly, but it won't work with a PHP mail form. I am using Exim as the mail server with Gmail's MX records, etc. I'm pretty sure everything is set up properly except the SMTP mail server

I am getting the following errors via logs:

SMTP error from remote mail server (Error 550)

The mail server could not deliver mail to [email protected] The account or domain may not exist, they may be blacklisted, or missing the proper dns entries
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

Are you using Google's mail server name as the SMTP host address in the PHP script? If so, you will need to ensure the "WHM >> SMTP Restrictions" option is disabled if you want to allow that to work.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Where is the PHP script located?
Hello,

I'm referring to the PHP script you are using to send the email. Also, is the domain name in-question listed in the /etc/remotedomains file on this server?

Thank you.