https://github.com/fastack-dev/fastack-mail
https://github.com/fastack-dev/fastack-mail
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/fastack-dev/fastack-mail
- Owner: fastack-dev
- Created: 2021-12-20T11:18:15.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-14T16:51:44.000Z (over 1 year ago)
- Last Synced: 2024-11-10T07:43:06.808Z (over 1 year ago)
- Language: Python
- Size: 40 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fastack-mail
Simple plugin for sending email.
This plugin is inspired by [fastapi-mail](https://github.com/sabuhish/fastapi-mail)
## Installation
```
pip install fastack-mail
```
## Usage
### Install plugin
```py
PLUGINS = [
...,
"fastack_mail",
]
```
### Configuration
* `EMAIL_BACKEND` = "fastack_mail.backend.EmailBackend" [required]
* `EMAIL_HOSTNAME` = SMTP Server (e.g. "localhost") [required]
* `EMAIL_PORT` = SMTP Port Server (e.g. 8025) [required]
* `EMAIL_USERNAME` = SMTP username (e.g. "john@doe.com") [optional]
* `EMAIL_PASSWORD` = SMTP password (e.g. "luarbiasa") [optional]
* `EMAIL_TIMEOUT` = Connection time out (default 60) [optional]
* `EMAIL_USE_TLS` = If `True`, make the _initial_ connection to the server over TLS/SSL (default False)
* `EMAIL_START_TLS` = If `True`, make the _initial_ connection to the server over plaintext, and then upgrade the connection to TLS/SSL. Not compatible with `EMAIL_USE_TLS`. (default False)
* `EMAIL_VALIDATE_CERTS` = Determines if server certificates are validated (default True)
* `EMAIL_CLIENT_CERT` = Path to client side certificate, for TLS verification. (default None)
* `EMAIL_CLIENT_KEY` = Path to client side key, for TLS verification. (default None)
* `EMAIL_CERT_BUNDLE` = Path to certificate bundle, for TLS verification. (default None)
* `EMAIL_ASYNC_MODE` = If `True`, the `EmailBackend.send` function returns an awaitable object, if `False` it returns an immediate send result. (default False)
* `DEFAULT_FROM_EMAIL` = Default sender email for use globally (if there is no sender email) (e.g. "Local \")
### Example
See here https://github.com/fastack-dev/fastack-mail/tree/main/examples/mail