Hi guys,
I have to implement some rules for preventing the send of emails if some conditions are met. I won't focus on the conditions, I just need to know what would be the best practice.
I have identified a few notifications: OnBeforeSendReceipt, OnAfterSubmitSave and OnBeforeSendMail.
I am not sure if these are the ideal one to use in case I don't want the email to be sent to either the sender (receipt) or the admin. And I don't want to save it in the database either.
If the notifications are the right ones, what would be the best method to use in order to prevent it from sending/saving?
I have identified: onBeforeRenderArgs.Submit.Delete() but I am not sure what it does exactly.
Thank you,
Adrian