Skip to content

nicks-technik/SendEmail2GroupsWithPdfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sendEmail

The program searches for PDF files in a special naming format (group_name+attach1.....pdf) and sends them to different email addresses.

The addresses are loaded from a CSV file containing the group name and the email addresses.

File name format of the PDF files

The two spaces (also after the Firstname) are important, because they are referenced for the search. All stuff behind is not important. Only the .pdf extension.

Groupname additional Stuff .pdf

Examples:

Lastname Firstname xxxxxxxxxxxx xx x x.pdf
Smith Kaith bill.pdf
Gilles Tom Bill.pdf
Smith Kaith incoice.pdf
Smith Keith chocolate.pdf
Gilles Tom cake.pdf
Mueller Craig chocolate cake.pdf

To do:

In the main folder

  • Store the client_secret.json file (from the Video above) in the main folder
  • Rename and edit the .env.example file to .env with the appropriate values
  • Create and activate a venv and load the modules according to the requirements.txt file.

In the config folder

  • Rename the groups.csv.example file to groups.csv and fill in the working groups and emails.
  • Rename and edit the mail.txt.example file to mail.txt and insert the html format body text.

Start of the program

Now you can start the program in the venv:

python3 sendEmail.py

The program goes through the PDF directory, searches acording to the groups.csv and send the emails. After sending of each email the related PDF files are moved to the old directory.

About

Send Emails to defined groups with Bills and other PDF files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages