/sendAttachmentEmailPython

Monitoring a Folder and send any file from this folder to a list of email with a beautiful html email :email:

Primary LanguagePython

💌 Send Email with any kind of attachment from a folder

email

📚 Description

Monitoring a folder with this bot and when this folder would have a file, my bot will take this file and send it as email to a list of emails from a txt

🚀 Technologies have used

Structure's Project 📌

|-- controller
     |--email.py
     |--functions.py
|-- .env
|-- database
|-- _init_.py
|-- listaEmails.txt
|-- requirements.txt

📢 How to use

Required:

Python 3.7.5 or more
Node 10x
Tips about Linux's Environment:
Before everything you need to rum this command:

sudo apt update

Install Python 3:

sudo apt-get install python3

Install pip 3:

sudo apt-get install python3-pip

Install Node:

sudo apt install nodejs

Install npm:

sudo apt install npm

Create specific tables in your database,executing script below:

script_bd.sql

Install all python's dependencies with script below:

pip install  -r requiriments.txt
pip3 install  -r requiriments.txt(linux)

Install lib "pm2" on your node.js with NPM:

npm install -g pm2

After every installations you can execute the bot,at directory's project with console CMD:

pm2  start  _init_.py

if your linux has other versions installed, you need to use:

pm2  start  _init_.py --interpreter python3

#TIPS PM2#

List all bots:

pm2  list

Stop a bot:

pm2  stop _init_.py

Show bot's log:

pm2  logs _init_.py

There are many commands on PM2 you can see at all in its documentation https://www.npmjs.com/package/pm2.

🔓 Licença

MIT © Paulo Mota