I have carefully read through this thread and applied the advice that some users have provided, and I still get the following error message:
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\Apache\htdocs\NEWSITE\bin\email_processor.php on line 25
Here are my php.ini [mail] configurations:
; For Win32 only.
SMTP = smtp.myhost.net
; For Win32 only.
sendmail_from = myemail@domain.com
I did restart Apache a couple times, and still get the above error message.
Here is a code snippet from my email processor script:
$name = $_POST['Name'];
$email = $_POST['EmailAddress'];
$message = $_POST['TicketMessage'];
$subject = $_POST['TicketSubject'];
$mail_newline = "\r\n";
$mail_body = "Below are comments sent to you on" . $today . $mail_newline;
$mail_body .= "=============================================================" . $mail_newline;
$mail_body .= "Name: " . $name . $mail_newline;
$mail_body .= "Email Address: " . $email . $mail_newline;
$mail_body .= "Subject: " . $subject . $mail_newline;
$mail_body .= "Message:" . $mail_newline;
$mail_body .= $message;
$mail_header .= "From: " . $email . $mail_newline;
$mail_header .= "To: " . $info_email . $mail_newline;
$mail_header .= "X-Mailer: " . SCRIPT_TITLE . VERSION . $mail_newline;
$send_mailer = mail($name, $subject, $message, $mail_body, $mail_header);
if (!$send_mailer) {
header ("Location: /index.php?section=about_contact");
}
else {
return $send_mailer;
header ("Location: /index.php?success_msg=messagesent");
}
My system configurations are as follows:
Windows XP (Home Edition)
Apache 2.0
PHP 4.0
Any ideas of what I can do to get this to work would be greatly appreciated.
Thanks in advance.