Skip to content

dan-maftei/mailfetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mailfetcher

mailfetcher is a Python 3 wrapper against transferwee to download (and optionally extract) zip archives received via wetransfer. Download links for the files being received are extracted from the e-mail messages received upon transfer

Requirements

Apart from standard python3 libraries, the script requires

Usage

The entire code is wrapped in a class that is instantiated by passing various options as argument in a dictionary:

from mailfetcher import MailFetcher 
worker = MailFetcher({            
    'server': 'mail.example.com',
    'user': 'john.doe',         
    'pass': 'SuperStr0ngPass', 
    'outdir': '/store/zipfiles/'
})                              
worker.fetch()                 
worker.disconnect()           

Config options

Key Default value Meaning
server None, write down yours IMAP server address (hostname or IP number). Should use SSL (port 993)
user None, write down yours IMAP account username
pass None, write down yours IMAP account password
mailbox 'inbox' IMAP folder to search for UNREAD messages
outdir '/tmp/zipfiles' Output folder (will download and extract archives here)
autostart False Start fetching after instantiation, no need to call MailFetcher.fetch()
unzip True Extract (unzip) automatically after download
keep_archive True Keep the zip after extracting, delete otherwise

About

Fetch zip files sent via wetransfer and extract the content locally

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages