Hello
A website I've built for a client is having some issues with the PHP mailer I've built for it. I've used this code on over 5 sites and they all work except this one.
Quote:
<?php
if($sentemail == "2"){
include("sorry.php");
}else{
$num = $sentmessage + 1;
setcookie("sentemail","$num",time()+600); //set the cookie
$emailmsg = "Sender Name:\t$name
E-Mail:\t$email\n\n
E-mail Subject:\t$emailsubject\n
Message:
\t$emailmessage\n
Contact Information:
\t$address
\t$city, $state $zip\n";
$to = "anyone@anywhere.com";
$subject = "Information Request";
$mailheaders = "From: $email <> \n";
$mailheaders .= "Reply-To: $email\n\n";
mail($to, $subject, $emailmsg, $mailheaders);
include("thanksecho.php");
}
?>
|
Once he installed this to his server we found out that he did not have PHP installed. So I installed it on his server and configured the .ini file. This is the error that I receive.
Quote:
|
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in e:\blakleysinternet\thanks3.php on line 22
|
I've set the "sendmail_from" in the .ini file but that didn't seem to help any. I've tried a couple other things but nothing seems to work. Since the code is used ,and working, on several other sites I feel its a problem in the .ini or server. Any ideas?