The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Configuring SMTP Authentication for Sending Emails via a PHP Script

Discussion in 'E-mail Discussions' 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:
    37,204
    Likes Received:
    1,297
    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.
     
  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:
    37,204
    Likes Received:
    1,297
    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.
     
Loading...

Share This Page