Skip to content

A FastAPI based email api helps developers to integrate email services in your applications.

License

Notifications You must be signed in to change notification settings

afriddev/emailAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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":"toemail@gmail.com"
          }
  )
print(response.json())  

generate app password

default credentials

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

{
  "fromEmail":"defaultemailapi@gmail.com",
  "passkey":"my 16 digits passkey"
}

post json format

  {
      "fromEmail":"fromemail@gmail.com",
      "passkey":"16 DIGITS PASS KEY",  
      "toEmail":"toemail@gmail.com",
      "title":"your title",
      "subject":"your subject",
      "body":"your body message"
  }
  

Authors

About

A FastAPI based email api helps developers to integrate email services in your applications.

Resources

License

Stars

Watchers

Forks

Languages