Skip to content

Latest commit

 

History

History
79 lines (56 loc) · 1.43 KB

README.md

File metadata and controls

79 lines (56 loc) · 1.43 KB

pythonemailapi

pythonemailapi is written in pure python with the help of fastapi,you can sned emails by using this api and seamlessly integrate this api in you code very easily

Use in your code

Installing dependencies

Install required modules for this project

pip install -r requirements.txt

run

Run the server from your local machine

 python main.py

Useage

pip install requests
import requests
response = requests.get('http://0.0.0.0:8000')
print(response.json())  

sendEmail

pip install requests
import requests
response = requests.post('http://0.0.0.0:8000/sendEmail',
  json={
      "toEmail":"[email protected]"
          }
  )
print(response.json())  

generate app password

default credentials

if you dont pass this params automaticall api will send email with default credentials

{
  "fromEmail":"[email protected]",
  "passkey":"my 16 digits passkey"
}

post json format

  {
      "fromEmail":"[email protected]",
      "passkey":"16 DIGITS PASS KEY",  
      "toEmail":"[email protected]",
      "title":"your title",
      "subject":"your subject",
      "body":"your body message"
  }
  

Authors