Notification email based on conditions