Partners mailing

Project information

  • Category: Desktop Development
  • Project date: 2022

Description

This program, launched automatically daily at night, extracts the transfer information of the partners sums of money from an Oracle database to generate them in PDF format and sends them as attachments in partner emails.

Technologies used

  • Python , cryptography, cx_Oracle, configparser, fpdf, arabic_reshaper, qrcode, cx-freeze, smtplib, ssl
  • Oracle Database

Application code samples

Modules used (not part of Python):

  • cryptography: Encrypt and decrypt sensitive data, like passwords
  • cx_Oracle: Connect to ORACLE database
  • fpdf: Generate PDF files
  • arabic_reshaper: Use arabic in PDF
  • qrcode: Generate QR codes
  • configparser: Create configuration file (ini file)
  • cx-freeze: Generate exe file

Python modules used:

  • smtplib: Mailing
  • ssl: Use SSL encryption protocol

Database: Oracle

Initialization, connection and use (SQL request).

Generation of PDF

Functions in order: Pdf initialization, Arabic reshaping, Pdf header generation, Pdf footer generation, adding QR code.

Main loop for generating Pdf content, with calling of all functions.

SendEmailInternet function to send email with attachement the PDF generated.

It can use the servers: Yahoo, Gmail and Hotmail.

Example of PDF generated.