I have a client that I don't host for, who is on a unix server that I know nothing about. I'm trying to set up an email script but it fails and I'm not sure why. I am not a PHP expert. Here's the code I have:
<?php
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body))
{
echo("<p>Message successfully sent!</p>");
}
else
{
echo("<p>Message delivery failed...</p>");
}
?>
Anybody have any ideas why it always fails?
Thanks for any help!!
<?php
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body))
{
echo("<p>Message successfully sent!</p>");
}
else
{
echo("<p>Message delivery failed...</p>");
}
?>
Anybody have any ideas why it always fails?
Thanks for any help!!