#NEWLINE# def createNewMessage( self ) : #NEWLINE# #INDENT# 'Create a new message in the queue.\n\n        Return a tuple - file-like object for headers, and ISMTPMessage.\n        ' #NEWLINE# fname = ( '%s_%s_%s_%s' % ( os . getpid ( ) , time . time ( ) , self . n , id ( self ) ) ) #NEWLINE# self . n = ( self . n + 1 ) #NEWLINE# headerFile = open ( os . path . join ( self . directory , ( fname + '-H' ) ) , 'wb' ) #NEWLINE# tempFilename = os . path . join ( self . directory , ( fname + '-C' ) ) #NEWLINE# finalFilename = os . path . join ( self . directory , ( fname + '-D' ) ) #NEWLINE# messageFile = open ( tempFilename , 'wb' ) #NEWLINE# from twisted.mail.mail import FileMessage #NEWLINE# return ( headerFile , FileMessage ( messageFile , tempFilename , finalFilename ) )