Okay, just for a bit of a preface so you know what’s going on. I’m learning PHP and am now trying to implement what I know thus far into a simple form handler. Yes, I know that there are probably millions of these in different scripts, but how would I learn other than doing it myself? The only problem is that the script here won’t send the email.
[code=php]<?PHP
$body = “Registration FormnnName: ” . $name. “nnEmail Address: ” . $from . “nnAddress: ” . $address . “n” . $zip . “nnPhone Number: ” . $phNumber . “nnBaptized Family Members: ” . $family . “nMember Status: ” . $status;
mail(“[email protected]”,”Registration Form”,$body,”From:” . $from . “n”);
?>
Now, I’ve already used echo (“”) to make sure that I’ve set $body correctly, and it works fine. However, this script won’t email anything at all. I don’t get any emails from it (no, I wasn’t stupid enough to put mydomain.com, in the script it is my website’s address, and the mailbox is fully functional). My first question is, Do I have the proper syntax? My second question is, Do I have to configure my server at all, or do I need to include the path to my sendmail program, like with the premade CGI script I currently use? Please help, I’m thoroughly confused.