|
//********** Send email with old data record ************
global $conn,$strTableName;
$email="test@test.com";
$from="admin@test.com";
$msg="";
$subject="Sample subject";
// modify the following SQL query to select
fields you like to send
$rs = db_query("select * from "
.
$strTableName ." where ". $where,$conn);
if($data=db_fetch_array($rs))
{
foreach($data as $field=>$value)
$msg.= $field." : ".$value."\r\n";
$ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from));
if(!$ret["mailed"])
echo $ret["message"];
}
|