Heya!
I'm having an issue sending an email with a very stripped down PHP script. The goal is to email a confirmation to clients.
My web server and my Exchange server are on the same domain. PHP is installed on the web server.
I have tried to mail using the fully-featured script, which failed, so I wrote a very simple one to try to figure out what's wrong. That script:
<html>
<head><title>PHP Mail</title></head>
<body>
<?php
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
if (mail($email,$subject,$message)) {
echo "<h4>Thank you for sending email</h4>";
} else {
echo "<h4>Can't send email to $email</h4>";
}
?>
</body>
</html>
This is the second mail script I've written, and the first one worked, but it has been some time since I'd used it, and checking that one again, I find that it too doesn't work. So I am kinda thinking that it isn't a PHP problem (unless my ini file is wrong?) and it may be a Server 2003 problem. I'm now the sysadmin for the domain, having taken over in the last few months. It could very well be that the old admin patched or changed something on the web server which is no longer allowing mails to go through. But I am a newb, and uncertain what I should check, or where I should check, or it there are some other ways to troubleshoot the mail problem.
I should note that I am not getting any errors..
Can anyone point me in the right direction?