#NEWLINE# def _create_related_attachment( self , filename , content , mimetype = None ) : #NEWLINE# #INDENT# '\n        Convert the filename, content, mimetype triple into a MIME attachment\n        object. Adjust headers to use Content-ID where applicable.\n        Taken from http://code.djangoproject.com/ticket/4771\n        ' #NEWLINE# attachment = super ( EmailMultiRelated , self ) . _create_attachment ( mimetype , content , mimetype ) #NEWLINE# if filename : #NEWLINE# #INDENT# mimetype = attachment [ 'Content-Type' ] #NEWLINE# del attachment [ 'Content-Type' ] #NEWLINE# del attachment [ 'Content-Disposition' ] #NEWLINE# attachment . add_header ( 'Content-Disposition' , 'inline' , filename = filename ) #NEWLINE# attachment . add_header ( 'Content-Type' , mimetype , name = filename ) #NEWLINE# attachment . add_header ( 'Content-ID' , ( '<%s>' % filename ) ) #NEWLINE# #UNINDENT# return attachment