Hello, I am using the code below to try to send mail, and it is returning TRUE, but the recipients are not recieving the messages. I have tried with several e-mail addresses that are known to be good, and have checked for spam filtering as well. The sendmail binary is in the path, and the mail() function is working fine with other scripts on the site. Any help would be greatly appreciated.
Code:
echo("<pre>$body</pre>");
$subject="Your SCDBA Registration";
$headers='From: webmaster@scdba.org';
if (mail($semail, 'Your SCDBA Registration', $body, 'From: webmaster@scdba.org')) {
echo("An E-mail confirmation has been sent to $semail . ");
} else { echo("An error occurred sending mail to $semail but your registration has been submitted.");
}
if (mail($hemail, 'Your SCDBA Registration', $body, 'From: webmaster@scdba.org')) {
echo("An E-mail confirmation has been sent to $semail . ");
} else { echo("An error occurred sending mail to $hemail but your registration has been submitted.");
}