def init_handler(self):
        assert self.options.get('host') and self.options.get('port'), "Invalid options"
        assert self.options.get('to'), 'Recipients list is empty. SMTP disabled.'
        if not isinstance(self.options['to'], (list, tuple)):
            self.options['to'] = [self.options['to']]
Check self options.
dataset/ETHPy150Open klen/graphite-beacon/graphite_beacon/handlers/smtp.py/SMTPHandler.init_handler