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
Install required modules for this project
pip install -r requirements.txt
Run the server from your local machine
python main.py
pip install requests
import requests
response = requests.get('http://0.0.0.0:8000')
print(response.json())
pip install requests
import requests
response = requests.post('http://0.0.0.0:8000/sendEmail',
json={
"toEmail":"[email protected]"
}
)
print(response.json())
if you dont pass this params automaticall api will send email with default credentials
{
"fromEmail":"[email protected]",
"passkey":"my 16 digits passkey"
}
{
"fromEmail":"[email protected]",
"passkey":"16 DIGITS PASS KEY",
"toEmail":"[email protected]",
"title":"your title",
"subject":"your subject",
"body":"your body message"
}