Send email after updates and create


I would like my app send an email once I create new post , and once I update my post. The email will send it based on people in section "TO:".

I created form using CRUD and the files are:


Emails list:


Thanks a lot for support.


you can use this extension:

Thanks but How I can use within my UPDATE button?

Put a code for sending a mail into model’s afterSave() method?