Email notification

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
Moh Youba
Veteran Member
Posts: 67
Joined: 2017-03-12 09:31

Email notification

Post by Moh Youba » 2019-09-10 21:48

Hello

I am looking for a help to send email notification once a record is added.

For example, a user add a data, admin receive a message, something like " Hello, a new record just added by 'username'".

Thank you

Moh Youba
Veteran Member
Posts: 67
Joined: 2017-03-12 09:31

Re: Email notification

Post by Moh Youba » 2019-09-10 22:52

Hello
By following a post on the forum I find this code
code.jpg
code.jpg (133.83 KiB) Viewed 52 times
but when I try I get this error, any help please
errors.jpg
errors.jpg (17.75 KiB) Viewed 52 times
Thank you

Moh Youba
Veteran Member
Posts: 67
Joined: 2017-03-12 09:31

Re: Email notification

Post by Moh Youba » 2019-09-10 22:59

got it, here the correct code

foreach($data as $field => $value){
$messageData .= "$field: $value \n";
}

sendmail(array(
'to' => '222@222.mr',
'name' => 'Mohamed Youba',

'subject' => 'Transfert',

'message' => "Un transfert a été envoyé par {$memberInfo['username']}: \n\n" . $messageData
));

return TRUE;
}

Thanks

Post Reply