Skip to main content


Showing posts from July, 2017

Gmail: Download blocked file

                                          Hi, today we are going to learn, how to download blocked file in gmail. Sometimes you see following message in gmail: and you can't download attached file Follow steps to download file: 1. Open original message as shown in image 2. Download Original let's name it download_original.txt 3.  Save following python script in same directory. Let's name it import email import sys if __name__=='__main__':     if len(sys.argv)<2:         print "Please enter a file to extract attachments from"         sys.exit(1)     msg = email.message_from_file(open(sys.argv[1]))     for pl in msg.get_payload():         if pl.get_filename(): # if it is an attachment             open(pl.get_filename(), 'wb').write(pl.get_payload(decode=True)) 4. Go to Python console If you are using MAC book or Linux OS - open terminal and type python type python    import_fil