#NEWLINE# def MailHTMLReport( self , recipient , subject = None ) : #NEWLINE# #INDENT# 'Mail the HTML report to recipient.' #NEWLINE# dt = rdfvalue . RDFDatetime ( ) . Now ( ) . Format ( '%Y-%m-%dT%H-%MZ' ) #NEWLINE# subject = ( subject or ( '%s - %s' % ( self . REPORT_NAME , dt ) ) ) #NEWLINE# report_text = self . AsHtmlTable ( ) #NEWLINE# email_alerts . EMAIL_ALERTER . SendEmail ( recipient , self . EMAIL_FROM , subject , ( self . EMAIL_TEMPLATE % dict ( report_text = report_text , report_name = self . REPORT_NAME , signature = config_lib . CONFIG [ 'Email.signature' ] ) ) , is_html = True ) #NEWLINE# logging . info ( 'Report %s mailed to %s' , self . REPORT_NAME , recipient )