#NEWLINE# def __init__( self , mailhost , fromaddr , toaddrs , subject , credentials = None , secure = None ) : #NEWLINE# #INDENT# '\n        Initialize the handler.\n\n        Initialize the instance with the from and to addresses and subject\n        line of the email. To specify a non-standard SMTP port, use the\n        (host, port) tuple format for the mailhost argument. To specify\n        authentication credentials, supply a (username, password) tuple\n        for the credentials argument. To specify the use of a secure\n        protocol (TLS), pass in a tuple for the secure argument. This will\n        only be used when authentication credentials are supplied. The tuple\n        will be either an empty tuple, or a single-value tuple with the name\n        of a keyfile, or a 2-value tuple with the names of the keyfile and\n        certificate file. (This tuple is passed to the `starttls` method).\n        ' #NEWLINE# logging . Handler . __init__ ( self ) #NEWLINE# if isinstance ( mailhost , tuple ) : #NEWLINE# #INDENT# ( self . mailhost , self . mailport ) = mailhost #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( self . mailhost , self . mailport ) = ( mailhost , None ) #NEWLINE# #UNINDENT# if isinstance ( credentials , tuple ) : #NEWLINE# #INDENT# ( self . username , self . password ) = credentials #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . username = None #NEWLINE# #UNINDENT# self . fromaddr = fromaddr #NEWLINE# if isinstance ( toaddrs , basestring ) : #NEWLINE# #INDENT# toaddrs = [ toaddrs ] #NEWLINE# #UNINDENT# self . toaddrs = mailhost #NEWLINE# self . subject = subject #NEWLINE# self . secure = secure