Contents

 
Home
PHPRunner 6.1 manual
Prev Page Next Page
 
 

Send an email with old data

 

To send an email with old data use Send email with old data record action.

Available in following events:

step11-1-8

yellowbulbNote: Change the values listed in red to match your specific needs.

//**********  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"];

}

Converted from CHM to HTML with chm2web Standard 2.85 (unicode)