How to set up multi-layered email notifications to be sent based on conditions?