Where in Cpanel where see the php mail configuration?


Jun 24, 2005
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.


Apr 24, 2010
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      = '[email protected]';
$subject = 'The test for php mail function';
$message = 'Hello';
$headers = 'From: [email protected]' . "\r\n" .
    'Reply-To: [email protected]' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
The above code will send an E-mail after browsing http://domain.com/test.php at [email protected] from [email protected] 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.