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.

PHP mail() function is disabled, yet script can send out e-mails

Discussion in 'E-mail Discussions' started by postcd, Nov 17, 2016.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    653
    Likes Received:
    11
    Trophy Points:
    68
    I have "Prevent “nobody” from sending mail" set to On, but e-mail is sent out despite php file with code
    shows that "mail" is within disabled functions.

    I set it to disabled by adding following to the end of /usr/local/lib/php.ini
    the mailing script is at /home/mycpanelnamehere/public_html/subdomain/name/dir/scriptname.php

    The sender is mycpanelnamehere@myserverhostname.tld

    Not sure why?

    Can i modify that cpanel and set its mailing limit to 0?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know which PHP handler is configured for the account, and if the system uses EasyApache 3, or EasyApache 4?

    Thank you.
     
  3. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    392
    Likes Received:
    11
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
  4. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    653
    Likes Received:
    11
    Trophy Points:
    68
    @cPanelMichael
    PHP handler is SuPHP
    EasyApache 3 is used.

    @ruzbehraja
    here is those log entries from exim_mainlog
    thank you
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    With suPHP, the PHP processes arn't run as the nobody user, so the "Prevent “nobody” from sending mail" option would not apply in this case.

    Also, could you verify if any custom php.ini files exist within the affected account?

    Thank you.
     
  6. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    653
    Likes Received:
    11
    Trophy Points:
    68
    php.ini is not anywhere within /home/CpanelAccountName/ or its subdirectories.
    no .htaccess file contains phrasse "mail"
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
Loading...

Share This Page