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.

Where in Cpanel where see the php mail configuration?

Discussion in 'E-mail Discussions' started by dacoda, Apr 22, 2010.

  1. dacoda

    dacoda Registered

    Apr 22, 2010
    Likes Received:
    Trophy Points:
    I use php mail() function on my script but I didn't work. I checked the script and double checked it is all correct but still i can't send. Is there a way in Cpanel where i can see the configuration of my php mail() function?
  2. Spiral

    Spiral BANNED

    Jun 24, 2005
    Likes Received:
    Trophy Points:
    What you are asking more generally is a huge pandora's box and would be virtually impossible to tell you all the possible reasons your script might not be working for mail sending as the potential problems number in the hundreds and you kind of have to know what you are looking at.

    To your more specific question, your configuration for how sendmail is called from the mail() function internally in the system is setup and configured in your main PHP.INI file usually located in /usr/local/lib.

    There is many other factors at work here though ....

    Is your script code setup properly? (big one here!)

    Are you blocking mail access from your server?

    Do you have "disable mail from nobody" options selected in "Tweak Settings" when you don't actually have SuPHP or FCGI based PHP?

    Are any error messages being listed in /var/log/maillog and /var/log/exim_mainlog?

    Are any error messages being shown on your site or local "error_log" file?

    Is exim actually up and running?

    Do you have CSF firewall and have the SMTP tweak option in the firewall and the one in WHM both enabled? --- common mistake.

    Does your IP address for your server have proper reverse DNS setup?

    Do you have an SPF record setup for your DNS zone?

    Is your server's IP listed in any Blacklist / RBL databases?

    Are you trying to run Cpanel on a home DSL or Cable modem account?

    Those questions above focus in on just a few of the more common items that can contribute to your PHP script not being about to send out any email messages.

    HOST.CO.IN Registered

    Apr 24, 2010
    Likes Received:
    Trophy Points:
    Mostly hosting provider disable php mail() to send an E-mail to stop spaming from server. First make sure that php mail() is enable on your domain hosted server by creating test.php page with following php mail() script.

    $to      '';
    $subject 'The test for php mail function';
    $message 'Hello';
    $headers 'From:' "\r\n" .
    'Reply-To:' "\r\n" .
    'X-Mailer: PHP/' phpversion();
    The above code will send an E-mail after browsing at from with the content "Hello" and subject "The test for php mail function". Once you confirmed php mail() enabled on your domain hosted server then you have to check your script codes or you can contact your hosting providing as they are having control over your domain hosted server.

Share This Page