def __init__(self, mailhost, fromaddr, toaddrs, subject,
                 credentials=None, secure=None):
        logging.Handler.__init__(self)
        if isinstance(mailhost, tuple):
            self.mailhost, self.mailport = mailhost
        else:
            self.mailhost, self.mailport = mailhost, None
        if isinstance(credentials, tuple):
            self.username, self.password = credentials
        else:
            self.username = None
        self.fromaddr = fromaddr
        if isinstance(toaddrs, basestring):
            toaddrs = [toaddrs]
        self.toaddrs = toaddrs
        self.subject = subject
        self.secure = secure
Initialize the handler.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/logging/handlers.py/SMTPHandler.__init__