[vox-tech] PHP Mail not sending mail

Dave Margolis dave at silogram.net
Mon Sep 18 12:58:16 PDT 2006


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 at 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 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)
>
>
> _______________________________________________
> vox-tech mailing list
> vox-tech at lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>
>
>
>


More information about the vox-tech mailing list