Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Fastapi-Mailman is a Fastapi extension providing simple email sending capabilities. It's actually a hard fork of waynerv's
flask-mailman
module. I have tried to implement the same features for the Fastapi
too.
It was meant to replace the basic Fastapi-Mail with a better warranty and more features.
Github Repo
PYPI
Documentation
Fastapi-Mailman ported Django's email implementation to your Fastapi applications, which may be the best mail sending implementation that's available for python.
The way of using this extension is almost the same as Django.
Documentation: https://marktennyson.github.io/fastapi-mailman.
from fastapi import FastAPI
import uvicorn as uv
from fastapi_mailman import Mail, EmailMessage
from fastapi_mailman.config import ConnectionConfig
app = FastAPI(debug=True)
config = config = ConnectionConfig(
MAIL_USERNAME = 'example@domain.com',
MAIL_PASSWORD = "7655tgrf443%$",
MAIL_BACKEND = 'smtp',
MAIL_SERVER = 'smtp.gmail.com',
MAIL_PORT = 587,
MAIL_USE_TLS = True,
MAIL_USE_SSL = False,
MAIL_DEFAULT_SENDER = 'example@domain.com',
)
mail = Mail(config)
@app.get("/send-base")
async def send_base():
msg = EmailMessage('this is subject', 'this is message', to=['aniketsarkar@yahoo.com'])
await msg.send()
return {"Hello": "World"}
@app.get("/send-mail")
async def check_send_mail():
await mail.send_mail("this is subject", "this is message", None, ["aniketsarkar@yahoo.com"])
return {"Hello": "World"}
if __name__ == "__main__":
uv.run(app, port=8082, debug=True)
master
branch.To run this project on your local machine please click here
Credits goes to these peoples:
Copyright (c) 2021 Aniket Sarkar(aniketsarkar@yahoo.com)
FAQs
Porting Django's email implementation to your FastAPI applications.
We found that fastapi-mailman demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.