#NEWLINE# def post( self ) : #NEWLINE# #INDENT# f = self . request . POST [ 'file' ] #NEWLINE# mail . send_mail ( sender = '{}@appspot.gserviceaccount.com' . format ( app_identity . get_application_id ( ) ) , to = 'Albert Johnson <Albert.Johnson@example.com>' , subject = 'The doc you requested' , body = '\nAttached is the document file you requested.\n\nThe example.com Team\n' , attachments = [ ( f . filename , f . file . read ( ) ) ] ) #NEWLINE# self . response . content_type = 'text/plain' #NEWLINE# self . response . write ( 'Sent {} to Albert.' . format ( f . filename ) )