📬 Fastapi-Mailman
🔥 Porting Django's email implementation to your FastAPI applications.
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.
⛲ Key Features:
- Easy to use.
- Backend based email sender.
- Customisable backend class.
- Proper testcases.
- Proper documentation.
🔗 Important Links:
Github Repo
PYPI
Documentation
💯 Usage
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.
🪜 Basic Example
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)
🚇 Development
🧑💻 Contribution procedure.
- Create a new issue on github.
- Fork and clone this repository.
- Make some changes as required.
- Write unit test to showcase its functionality.
- Submit a pull request under the
masterbranch.
🖨️ Run this project on your local machine.
To run this project on your local machine please click here
❤️ Contributors
Credits goes to these peoples:
📝 License
Copyright (c) 2021 Aniket Sarkar(aniketsarkar@yahoo.com)
Metadata
Release files for fastapi-mailman 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Fastapi-Mailman-0.0.4.tar.gz | 17.9 kB | Without provenance | Details for Fastapi-Mailman-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Fastapi_Mailman-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for Fastapi_Mailman-0.0.4-py3-none-any.whl |
Total release size: 37.3 kB
Release files / Fastapi-Mailman-0.0.4.tar.gz
| Download URL | Fastapi-Mailman-0.0.4.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a610d547b38f12c4546719006ffb9c4a41dd4fa5cccb1de72e0ec1782e91cbce
|
|
BLAKE2b-256 checksum How to use checksums |
2d4342a7463887dbedd0e7aafca4ed0ecd5fe06df56cab356cb6ee5def4640e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.10 CPython/3.9.7 Darwin/21.3.0
|
Release files / Fastapi_Mailman-0.0.4-py3-none-any.whl
| Download URL | Fastapi_Mailman-0.0.4-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04f49af5c0a97f63bb61a53086d97bdecf0ecba6a9aca3e88d5cdb5f6a5b6995
|
|
BLAKE2b-256 checksum How to use checksums |
5ac5212db0097d253eeda1f4ed3e5954b7c285578bb2be86f56cf5ec84ea6faa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.10 CPython/3.9.7 Darwin/21.3.0
|
Security for fastapi-mailman 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.