PHP mail() not enabled

Avatar
  • Answered
I see that mail() is not enabled on bannermanbooks.com. Please see this link and you can check its code too.

http://******.com/test.php



ini_set( 'display_errors', 1 );
error_reporting( E_ALL );
$from = "[email protected]";
$to = "[email protected]";
$subject = "PHP Mail Test script";
$message = "This is a test to check the PHP Mail functionality";
$headers = "From:" . $from;
if( mail($to,$subject,$message, $headers)){
echo "Test email sent";

}else{

echo 'not sent';
}
Avatar
johnpaulb-imhs1
Hello yumna, Thank you for your question regarding PHP mail() not being enabled. The mail() function is enabled by default on all our servers. Here is a link to a similar question, where we provide more information on how to test. Ensure you are authenticating with your mail server with a password, as well as the email address username. I also recommend reviewing the mail logs for additional errors, or record of the transmission. Thank you, John-Paul