This topic is locked

Email send after record adding

2/27/2011 12:11:42 PM
PHPRunner General questions
author

hi im new to phprunner 4.1
i need email send after record adding to the table .....
i need that email to send with every field including with meningful email
mY table is Students ..... fields have student no , student name , address , paid amount
how to do the after record adding sending email
plz help me with the sample code

W
wadam45 2/27/2011

This works in 5.3
add to Events > After record added
$email="you@youremail.com";

$from="what@ever.com";

$msg="";

$subject="New Record added to your table";
foreach($values as $field=>$value)

{

if(!IsBinaryType(GetFieldType($field)))

$msg.= $field." : ".$value."\r\n";

}
$ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from));

exit();