[vox-tech] PHP Mail not sending mail

Richard S. Crawford rscrawford at mossroot.com
Mon Sep 18 10:48:07 PDT 2006


Here's the setup:

Apache 2.0
PHP 5
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 unexmail.ucdavis.edu'."\r\n".'Reply-To: 
rcrawford at unexmail.ucdavis.edu'."\r\n".'X-Mailer: PHP/'.phpversion();
    $report_message = "The TUBS/Moodle Integration Report is now available 
online.\n";
    $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 (http://www.mossroot.com)
Editor In Chief at Daikaijuzine (http://www.daikaijuzine.com)
Check out the Cthulhu Wiki: http://www.mossroot.com/cthulhuwiki
AIM: Buffalo2K / GTalk: underpope at gmail.com
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 : http://localhost.localdomain/pipermail/vox-tech/attachments/20060918/2b109c8b/attachment.pgp


More information about the vox-tech mailing list