I have php4 running on a Winnt box with Apache.
I have setup a mail form that takes the input a user gives, and tries to submit it via the mail function. At first, it wouldn't connect to the mailserver, so I installed a mailserver on the webserver. IT stopped the "cannot connect" error.
However, now when I try to run the script, I get..
Warning: Server Error in c:\apache\htdocs\tech\email_form.php on line 7
My script is really simple, here it is:
<?track_vars?>
<?php
$to = "mymail@company.com";
$from = "From:".$sender_name;
$body = "Problem:\$problem\n\n";
$subject= "Intranet Helpdesk\n";
mail($to,$from,$subject,$body);
echo "<h3> Your Request for Help has been sent</h3>";
echo "You should be hearing back from IT as soon as is possible<p></p>";
?>
When I run this, it just keeps feeding me the error in line 7, which is the "mail" call.
I've went into php.ini, and made sure to set smtp "mail" to localhost. That still doesn't help.
Anyone have any ideas ?