#NEWLINE# def deliver( self , message ) : #NEWLINE# #INDENT# args = [ self . executable , '-t' , '-i' ] #NEWLINE# if message . sendmail_f : #NEWLINE# #INDENT# log . info ( 'sendmail_f : {}' . format ( proc . sendmail_f ) ) #NEWLINE# args . extend ( [ '-f' , message . sendmail_f ] ) #NEWLINE# #UNINDENT# proc = Popen ( args , shell = False , stdin = PIPE ) #NEWLINE# proc . communicate ( bytes ( message ) ) #NEWLINE# proc . stdin . close ( ) #NEWLINE# if ( proc . wait ( ) != 0 ) : #NEWLINE# #INDENT# raise MessageFailedException ( ( 'Status code %d.' % ( proc . returncode , ) ) )