Skip to content

NarendraPAutomationEngineer/sendMailAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Python Flask REST API to send Mails using gmail

Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries.

How to run this code ?

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%"}'

Get Links With Coupon Codes For Udemy Course Using Below Link

Link ==> Udemy Links With Coupon Codes

About

Simple Flask REST API to send Mails

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages