l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2006 Sep 18 16:28

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] PHP Mail not sending mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] PHP Mail not sending mail


Comment out your call to mail() and do an:

echo $REPORT_INFO->recipients[$i];

in the place of the call to mail().

Be interesting to see if the e-mail addresses you expect to see are
actually there.

On 9/18/06, Richard S. Crawford <rscrawford@mossroot.com> wrote:
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@unexmail.ucdavis.edu'."\r\n".'Reply-To:
rcrawford@unexmail.ucdavis.edu'."\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 (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@gmail.com
Skype/Gizmo: underpope
"You can't trust your judgement when your imagination is out of focus."
                (Mark Twain)

vox-tech mailing list

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.