I am having trouble with this PHP mail script.
I have implemented the mail() function in PHP. It seems to be working except for the fact that it will not send the mail. I have been told that I need to change some of the configuration in the php.ini file. However, I am not sure which ones I need to change??
Especially since I am using Unix, do I need to change the: sendmail_path = ?
If so what does it need to be set to?
Secondly, do I need to set any of the other configuration for this function?
Thanks!
Here is the code if needed:
Code: Select all
<?php
$name = $_REQUEST['name'];
$last = $_REQUEST['last'];
$email = $_REQUEST['email'];
$comments = $_REQUEST['comments'];
$content = "$name $last with an email of: $email made the following comments on your site: $comments";
$test = mail('j22cal@aol.com', 'Contact from web viewer', $content);
if ($test == true)
{
echo "Email was sent sucessfully";
}
else {
echo "Email did not submit!!!";
}
echo "<br></br>";
?>
Thanks for your help!