#NEWLINE# def __init__( self , socket , handlers , auth = False , tls = None , tls_immediately = False , tls_wrapper = None , command_timeout = None , data_timeout = None ) : #NEWLINE# #INDENT# self . handlers = handlers #NEWLINE# self . extensions = Extensions ( ) #NEWLINE# self . io = IO ( socket , tls_wrapper ) #NEWLINE# self . bannered = False #NEWLINE# self . have_mailfrom = None #NEWLINE# self . have_rcptto = None #NEWLINE# self . ehlo_as = None #NEWLINE# self . authed = False #NEWLINE# self . extensions . add ( '8BITMIME' ) #NEWLINE# self . extensions . add ( 'PIPELINING' ) #NEWLINE# self . extensions . add ( 'ENHANCEDSTATUSCODES' ) #NEWLINE# self . extensions . add ( 'SMTPUTF8' ) #NEWLINE# if ( tls and ( not tls_immediately ) ) : #NEWLINE# #INDENT# self . extensions . add ( 'STARTTLS' ) #NEWLINE# #UNINDENT# if auth : #NEWLINE# #INDENT# if isinstance ( auth , list ) : #NEWLINE# #INDENT# auth_obj = SASLAuth ( auth ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# auth_obj = SASLAuth ( ) #NEWLINE# #UNINDENT# auth_session = AuthSession ( auth_obj , self . io ) #NEWLINE# self . extensions . add ( 'AUTH' , auth_session ) #NEWLINE# #UNINDENT# self . tls = validate_tls ( tls , server_side = True ) #NEWLINE# self . tls_immediately = tls_immediately #NEWLINE# self . command_timeout = command_timeout #NEWLINE# self . data_timeout = ( data_timeout or command_timeout )