Skip to content

Through IMAP, downloads email messages and attachments into a folder named as email_code.

Notifications You must be signed in to change notification settings

rc4ne/imap-email-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

imap-email-downloader

Through imap, downloads email message and attachments into folder named as email_code.

Usage

For organisation based mailboxes: -> Replace the URL with needed url, such as webmail.organisation.com

->Replace USERNAME , PASSWORD.

->pip install imap_tools

->Execute and search mail using subject.

->Folder will be formed on Desktop

For gmail:

-> Replace URL with imap.gmail.com

->Replace USERNAME, PASSWORD.

->pip install imap_tools

->Go to gmail.com > Settings gear at top right > See all Settings >Forwarding POP/IMAP >Enable IMAP.

->Go to https://myaccount.google.com/security turn on "Less Secure App Access" if feasible. (Warning: Potentially considered dangerous)

-> Execute the script

Customizations

By default script uses "subject" to search for emails. To use some other way of accessing, please refer to https://pypi.org/project/imap-tools/#search-criteria
Example: To download all the mails, mailbox.fetch(AND(all=True))

imap

output

About

Through IMAP, downloads email messages and attachments into a folder named as email_code.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages