Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries.
Step1: Clone this repo using below command
git clone https://github.com/NarendraPAutomationEngineer/sendMailAPI.git
Step2:
cd sendMailAPI
Step3:
pip install -r requirements.txt or pip3 install -r requirements.txt
Step4:
Now open Browser then login into your gmail and then open the below link
https://myaccount.google.com/u/4/security?hl=en
Finally enable 2-step verifiction by passing mobile number and then create app password
Step5:
Update gmailID & gPass (16 character which you get from above step) in configs.py file
Step6:
Now run with python app.py or python3 app.py
Step7:
open new terminal and try the below command to send mail using the api
curl -i -X POST -H "Content-Type: application/json" http://192.168.0.111:8080/mail -d '{"subject": "Alert! File System Usage", "toMailId": "dowithpython@gmail.com", "mailBody": "File System Usage is : 85%"}'
Link ==> Udemy Links With Coupon Codes