OK, I'm doing my head in.
Can someone PLEASE tell me what's wrong here???
$subject = "NightCam Studios Site Update\r\n";
$message = "NightCam Studios is pleased to inform you that the site has recently been updated.\r\n\r\nVisit us at [url]http://www.nightcam-studios.com[/url]\r\n\r\nNightCam Studios Support\r\n";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: [email]support@nightcam-studios.com[/email]\r\n";
$headers .= "Reply-To: [email]support@nightcam-studios.com[/email]\r\n";
for($count = 0; $count < $records; $count++)
{
$row = mysql_fetch_row($result);
$email = stripslashes($row[0]);
?>
<font face="Arial" size="2">Sending mail to: <b><?=$email?></b>...</font>
<?
if(mail($email,$subject,$message,$headers))
{
?>
<font face="Arial" size="2" color="#008000"><b>OK</font></font>
<?
}
else
{
?>
<font face="Arial" size="2" color="#FF0000"><b>FAILED</b></font>
<?
}
?>
When I load the web page all I get is this...
Sending mail to: admin@pcproblems-online.com...
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in P:\Apache2\htdocs\admin\channel_0\mail.php on line 32
FAILED
Sending mail to: cdpettet@psiss.com...
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in P:\Apache2\htdocs\admin\channel_0\mail.php on line 32
FAILED
Sending mail to: support@nightcam-studios.com...
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in P:\Apache2\htdocs\admin\channel_0\mail.php on line 32
FAILED
My php.ini is set up correct even though it shouldn't be using it because of the overrides in the mail() call.
I have tried putting stuff in quotes, using \"XXX\", tried third party functions which reportedly function on Win32 OS (I'm using WinXP Pro BTW and Apache 2.044).
I don't have any fingernails OR hair left! It's driving me damn nuts!
PLEASE, PLEASE, PLEASE - someone help me out here - I don't want to have to resort to Perl!
Thanks
Chris.