l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
November 4: Social gathering
Next Installfest:
TBD
Latest News:
Oct. 24: LUGOD election season has begun!
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



Hmmm...

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
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@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
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@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@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech




_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
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:
Sunset Systems
Who graciously hosts our website & mailing lists!