This example demonstrates how to send an email after a successful addition of a new record. For this purpose you need to call the sendMailMessage() function from the OnAfterInsertRecord event. Click the button to see the event handler code.
An email with payment details will be sent to phpgenerator_feature_demo@mailinator.com. Try to add a new payment and then check the email address.