Im really getting bogged down on this one...Please could ye help me out here...
The form I created is meant to process details to my email address.
But it doesnt work and I get this warning:
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in c:\program files\apache group\apache\htdocs\newsite\thanks.php on line 222
In my PHP.ini file I have set the following...
; For Win32 only.
SMTP = localhost;
; For Win32 only.
sendmail_from = me@example.com;
In my PHP code the following is set...
$toaddress = 'my_email@yahoo.ie';
$subject = 'Feedback from Website';
$mailcontent = 'Customer name: '.$name."\n"
.'Customer email: '.$email."\n"
."Customer comments: \n".$feedback."\n";
$fromaddress= "From: $email";
if (!$name || !$comment)
{
echo '<h2>Please go back and enter your details.</h2>'
.'<br>The page should redirect back to the form shortly.</br>';
exit;
}
else
{
echo '<h2>Thank you '.$name.' for your feedback</h2>'
.'<br>The page should redirect shortly.</br>';
mail($toaddress, $subject, $mailcontent, $fromaddress);
}
Please, please could ye help me out! It would really make me so happy and I'm very grateful for your help.
Thanks again.
Kevin.