Conditional logic preventing emails to be sent