Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Sample events > Email

PHPrunner32x32     PHPRunner manual


Send an email with updated fields only

Scroll Prev Next More

 

To send an email with updated fields only, use the following code in Edit page: Before record updated event.

 

Note: Change red values to match your project.

 

$body = "Changed fields \n";
foreach ($values as $key => $value)
{
  if ($value!=$oldvalues[$key])
    $body .= $key . ": " . $value . "\n";
}
$email="test@test.com";
$subject="Sample subject";
runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $body));

See also:

Update selected

Send an email to all users

Send an email to selected users

Send simple email

runner_mail function

Email selected records

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software