I'm having trouble with one of my cron jobs, as its not sending out the email like it is supposed to:
<?php
/**
* @name report.cron.php
*
* @desc This file is the report generation cron job for the
* Administrative backend to be used by the Data Entry Clerks that
* are either contracted or in-house for The SCORE Group. This report
* outlines all information entered by a Data Entry Clerk on a given day
* for verification purposes when request of payment for work
* performed is provided by contract Data Entry Clerks.
*
* @copyright 2006 The SCORE Group
* @author Jonathan Bradley <bradleyj at scoregroup dot com>
* @package Model Directory
* @version 1.0.0
*/
// CONFIGURATION FILES
include ('../config.php');
include('../functions/functions.admin.misc.php');
function cron_entry_report () {
// SET DEFAULTS
$todays_date = date('Y-m-d');
// REPORT TITLE
echo '<p> </p>
<p> </p>
<div style="font-family:tahoma; font-size: 9pt; font-weight: bold; text-align: center;">Data Entry Clerk Report</div>
<div style="font-family:tahoma; font-size: 8pt; text-align: center;">For: '. $todays_date.'</div>
<br />';
// START TABLE
echo '<table border="1" cellspacing="0" cellpadding="4" rules="all" bordercolor="#A1ABB8" align="center">
<tr bgcolor="#D2D7E3">
<td style="font-family:tahoma; font-size: 9pt; font-weight: bold; text-align: center; width: 125px;">Username</td>
<td style="font-family:tahoma; font-size: 9pt; font-weight: bold; text-align: center; width: 200px;">Full Name</td>
<td style="font-family:tahoma; font-size: 9pt; font-weight: bold; text-align: center; width: 75px;"># of Models</td>
<td style="font-family:tahoma; font-size: 9pt; font-weight: bold; text-align: center; width: 100px;"># of Postings</td>
<td style="font-family:tahoma; font-size: 9pt; font-weight: bold; text-align: center; width: 125px;"># of Publications</td>
</tr>';
// GET CLERK INFORMATION
$sql = "SELECT username,firstname,lastname FROM md_users WHERE access='data'";
$query = mysql_query($sql);
for ($i=0; $i<$arr = mysql_fetch_array($query); $i++)
{
echo '<tr bgcolor="'.row_color($i).'">';
// GET NEW MODELS ADDED
$m_sql = "SELECT * FROM md_models WHERE addedby='".$arr['username']."' && added='".$todays_date ."'";
$m_q = @mysql_query($m_sql);
$total_models = @mysql_num_rows($m_q);
// GET NEW POSTINGS ADDED
$post_sql = "SELECT * FROM md_posting WHERE addedby='".$arr['username']."' && added='".$todays_date ."'";
$post_q = @mysql_query($post_sql);
$total_postings = @mysql_num_rows($post_q);
// GET NEW PRODUCTS ADDED
$prod_sql = "SELECT * FROM md_publications WHERE addedby='".$arr['username']."' && added='".$todays_date ."'";
$prod_q = @mysql_query($prod_sql);
$total_publications = @mysql_num_rows($prod_q);
echo '<td style="font-family:tahoma; font-size: 9pt; padding-left: 5px;">'.$arr['username'].'</td>
<td style="font-family:tahoma; font-size: 9pt; padding-left: 5px;">'.$arr['firstname'].' '.$arr['lastname'].'</td>
<td align="center" style="font-family:tahoma; font-size: 9pt;">'.$total_models.'</td>
<td align="center" style="font-family:tahoma; font-size: 9pt;">'.$total_postings.'</td>
<td align="center" style="font-family:tahoma; font-size: 9pt;">'.$total_publications.'</td>
</tr>';
}
echo '</table>';
}
$body = cron_entry_report();
$hdrs = "Sender: model@scoregroup.com
Reply-To: model@scoregroup.com";
mail("scrypte@gmail.com", "Data Entry Report", $body, $hdrs);
?>
All I get is something that Says
From: Apache
Subject: Data Entry Report
and the body is 100% empty.
Any ideas?