def _should_send(self, rebuild, success, canceled):
        should_send = False

        should_send_mapping = {
            self.MANUAL_SUCCESS: not rebuild and success,
            self.MANUAL_FAIL: not rebuild and not success,
            self.AUTO_SUCCESS: rebuild and success,
            self.AUTO_FAIL: rebuild and not success,
            self.AUTO_CANCELED: rebuild and canceled
        }

        for state in self.send_on:
            should_send |= should_send_mapping[state]
        return should_send
Show the version
dataset/ETHPy150Open projectatomic/atomic-reactor/atomic_reactor/plugins/exit_sendmail.py/SendMailPlugin._should_send--crossover with--dataset/ETHPy150Open epsy/clize/examples/altcommands.py/version