PHP Mail not sending mail

Richard S. Crawford rscrawford at
Mon Sep 18 17:48:41 UTC 2006

Here's the setup:

Apache 2.0
Postfix installed

The mail() function call looks like this:

$num_recipients = count($REPORT_INFO->recipients);
    $report_subject = "DLC Auto Enroll Report Available";
    $report_headers = 'From: rcrawford at'."\r\n".'Reply-To: 
rcrawford at'."\r\n".'X-Mailer: PHP/'.phpversion();
    $report_message = "The TUBS/Moodle Integration Report is now available 
    $report_message .= "The URL is: ".$REPORT_INFO->url."\n\n";
    for ($i = 0; $i < $num_recipients; $i++) {
        print "<p>Sending report to ".$REPORT_INFO->recipients[$i]."</p>";
        if (!mail($REPORT_INFO->recipients[$i],$report_subject,
$report_message,$report_headers)) {
            print "<p>Report could not be emailed</p>";

The mail() call returns false, and no message is sent.  Yet Apache reveals no 
errors.  I have PHP's error reporting set to E_ALL & E_STRICT but no messages 
are generated.  The host's fully qualified domain name seems set 
appropriately.  No error messages are showing up in /var/log/mail.err.  I've 
confirmed that the email addresses in the REPORT_INFO->recipients array are 
properly set.  The command just doesn't send mail.

I've Googled until my eyes bleed but I can't figure out what might be going 
wrong here.  Anyone have any suggestions?

Richard S. Crawford (
Editor In Chief at Daikaijuzine (
Check out the Cthulhu Wiki:
AIM: Buffalo2K / GTalk: underpope at
Skype/Gizmo: underpope
"You can't trust your judgement when your imagination is out of focus."
		(Mark Twain)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <>

More information about the kubuntu-users mailing list