My sample code is
<?php
/ First of all we define the variables which are the message,
the from address, the to address and the subject along with the headers
which are used to show who sent the email. /
$message = "Hello Someone\n this is a simple text email message\n";
$from = "someone@domain.com";
$to = "someone@anotherdomain.com";
$subject = "Simple Text Email";
$headers = "From: $from";
/ Now we are ready to send the email so we call php's mail() function
with the appropriate variables from above included in the brackets /
mail($to,$subject,$message,$headers);
?>
when i execute it i get this warning and the mail is not send
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in G:\Apache2\htdocs\Project\testing.php on line 12
Can anyone pls help me?
Thank you.
I haad changed the "sendmail_from"'s address in the php.ini.