#NEWLINE# def send_mail( self , user , **kwargs ) : #NEWLINE# #INDENT# request = kwargs . pop ( 'request' , None ) #NEWLINE# if ( request is None ) : #NEWLINE# #INDENT# tb = traceback . format_stack ( ) #NEWLINE# tb = [ ( '  ' + line ) for line in tb ] #NEWLINE# logger . warning ( 'send_mail called without request.\nTraceback:\n{}' . format ( '' . join ( tb ) ) ) #NEWLINE# self . _mail_sent = False #NEWLINE# return self . mail_sent #NEWLINE# #UNINDENT# ( self . _mail_sent , error ) = self . _send_mail ( request , user , ** kwargs ) #NEWLINE# if ( not self . mail_sent ) : #NEWLINE# #INDENT# self . add_error ( None , ValidationError ( self . mail_validation_error , code = error ) ) #NEWLINE# #UNINDENT# return self . mail_sent