This topic is locked
[SOLVED]

 How do I send only some fields

3/3/2012 8:49:46 PM
PHPRunner General questions
J
joiresende author

How do I send only some fields from a table after the record added.

C
cgphp 3/4/2012

Check the following link: http://xlinesoft.com/phprunner/docs/send_email_with_new_data.htm

Concatenate to the message body only the fields you want to send by email.

J
joiresende author 3/4/2012

Thanks for the reply,

Could you post an example.

C
cgphp 3/4/2012
$email="test@test.com";
$from="admin@test.com";
$subject="New data record";
$msg = "The body message is<br/>" . $values['field_name_1'] . "<br/>" . $values['field_name_2'] . "<br/>" . $values['field_name_3'];
$ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from));
if(!$ret["mailed"])

echo $ret["message"];
J
joiresende author 3/4/2012

Thank you, worked perfectly.