Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Configuring SMTP Authentication for Sending Emails via a PHP Script

Discussion in 'E-mail Discussion' started by cjoel, Aug 3, 2017.

  1. cjoel

    cjoel Registered

    Joined:
    Aug 3, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    76
    Location:
    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 root@example.com The account or domain may not exist, they may be blacklisted, or missing the proper dns entries
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,672
    Likes Received:
    1,788
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cjoel

    cjoel Registered

    Joined:
    Aug 3, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    76
    Location:
    California
    cPanel Access Level:
    Root Administrator
    Where is the PHP script located? I have SMTP Restrictions turned off
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,672
    Likes Received:
    1,788
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice