$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("pMessage successfully sent!/p");
} else {
echo("pMessage delivery failed.../p");
}
Wrote a basic php sendmail code that but it gives me the following error:
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\mail.php on line 5 Message delivery failed...
I changed the ``php.ini file and put [email protected]
but still the problem persists.
Writing the mail script for the first time.
Am I doing something wrong? Is there a better way to do this?