-
php error
Hi everyone
I tried to run the program to send Email but the bellow message occure. could anyone please tell me what is wrong and hwo to do the dirctive in php.ini file.
"sendmail_from" not set in php.ini or custom "From:" header missing in c:\wamp\www\phpexercise\Email.php on line 9
-
Re: php error
Show some code so we can have a look at it.
Usually if you want to make a change in the ini you need to call the ini_set function
For your system you might want to try
-
Re: php error
thanks for reply
this is the cod
Code:
<html>
<head>
<title>Untitled</title>
</head>
<body>
<?php
mail('[email protected]','Send an Email',"This message \r\nis the result \t\nOf a mail function()call.");
// chech if the email sent
$sent= mail('[email protected]','Send an Email',"This message \r\nis the result \t\nOf a mail function()call.");
if ($sent)
{
echo "The email was successfully sent.";
}
else
{
echo "the email not successfully sent.";
}
?>
</body>
</html>
-
Re: php error
JRSofty has given you the solution. Also, if you don't want to get spam I would edit your post and remove your email