Skip to content

this script helps downloading specified files from logged in email account on PC and move to shared drives

Notifications You must be signed in to change notification settings

tariqkhan051/email-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Email downloader

this script helps downloading specified files from logged in email account on PC and move to shared drives

How it works

  • Based on the configurations defined in config.json email attachments will be downloaded
  • Folders in Network Drive (Example: Z:/HR/Current) will be used to find current employees names, whereas folder names could be employees’ names or their email address image
  • All directories from the defined Network drive path will be first copied to local drive
  • If the sender email or sender name matches with the list of names we collected in previous step, then the document will be downloaded in the currentEmployeesPath, otherwise it will be downloaded in the newEmployeesPath
  • Folders on localPath will be copied to Network Drive path i.e. networkPath

Prerequisites

Python installed on your PC.

Outlook App configured with your email account.

Steps to run

Update configurations in config.json file.

Configurations

Parameter Description Example
allowed_extensions Emails with attachments having defined extensions will be considered ['.pdf', '.docx']
number_of_days_check Days to consider for emails. If 1, then only today’s emails will be considered 2
ignore_emails_from_senders Emails received from the sender email addresses starting from the defined list ['noreply']
only_unread If sets to True, then only unread emails will be considered True/False
localPath Path on local pc drive to copy directories from network drive
networkPath Network drive to copy directories from local drive
currentEmployeesPath Current Employees Folder path inside localPath
newEmployeesPath New Employees Folder path inside localPath

Run in CMD

Run python read_email.py to start the program

About

this script helps downloading specified files from logged in email account on PC and move to shared drives

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages