Jump to content

email script (will be cron job) not sending email


Recommended Posts

$sql="SELECT * FROM $tbl_name3 WHERE review_show='n'";
$result=mysql_query($sql);
$num_results=mysql_num_rows($result);
if($num_results > 1){
$message="You have ".$num_results." reviews unapproved.";
mail('example@example.com','GHP Reviews', $message, 'From: example@example.com');
}

$sql2="SELECT * FROM $tbl_name4 WHERE rma_issued='n'";
$result2=mysql_query($sql2);
$num_results2=mysql_num_rows($result2);
if($num_results2 > 1){
$message="You have ".$num_results2." RMA Numbers Requested.";
mail('example@example.com','GHP RMA Number Requests', $message, 'From: example@example.com');
}

 

The reviews email is being sent, however, the RMA email is not.

 

EDIT: Nevermind, $num_results and $num_results2 should have been > 0 not > 1.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.