Send Email function Tickets_after_insert
Send Email function Tickets_after_insert
Hi how can i or the best way to send an email to someone after function Table_after_insert($data, $memberInfo, &$args)
-
- Veteran Member
- Posts: 61
- Joined: 2017-03-12 09:24
Re: Send Email function Tickets_after_insert
Code: Select all
function tablename_after_insert($data, $memberInfo, &$args){
// to compose a message containing the submitted data,
// we need to iterate through the $data array
foreach($data as $field => $value){
$messageData .= "$field: $value \n";
}
sendmail(array(
'to' => '[email protected]',
'name' => 'Recipient Name',
'subject' => 'A new record needs your attention',
'message' => "The following new record was submitted by {$memberInfo['username']}: \n\n" . $messageData
));
return true;
}
https://bigprof.com/appgini/tips-and-tu ... ed-records