Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Predefined actions

Events. Send email with new data

Scroll Prev Next More

 

Send email with new data action allows sending an email containing information about new data in the table.  

 

You can edit several parameters: the text and the subject of the message, the sender and recipient email addresses.

 

Available in the following events:

Add page: Before record added

Add page: After record added

Edit page: Before record updated

Edit page: After record updated

send_email_with_new_data_select_action

 

Note: To use this action, you have to set up the Email settings. Press button email_settings_button_events  on the toolbar or write the code manually.

 

 

 

Note: To specify which table fields to email, edit the values assigned to $msg variable.

 

//**********  Send email with new data  ************
$email="test@test.com";
$from="admin@test.com";
$msg="";
$subject="New data record";
 
$msg.= "Name: ".$values["name"]."\r\n";
$msg.= "Email: ".$values["email"]."\r\n";
$msg.= "Age: ".$values["age"]."\r\n";
 
$ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from));
if(!$ret["mailed"])
echo $ret["message"];

See also:

runner_mail function

Send mass email to all users

Send an email with attachment

Send an email to selected users

Send simple email

Send email with old data

Email selected records

How to email selected records as separate PDF files

 

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