fastack-mail-0.1.0
توضیحات
Simple plugin for sending email
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | fastack-mail-0.1.0 |
| نام | fastack-mail |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | ['aprilahijriyan'] |
| ایمیل نگهدارنده | ['37798612+aprilahijriyan@users.noreply.github.com'] |
| نویسنده | aprilahijriyan |
| ایمیل نویسنده | hijriyan23@gmail.com |
| آدرس صفحه اصلی | https://github.com/fastack-dev/fastack-mail |
| آدرس اینترنتی | https://pypi.org/project/fastack-mail/ |
| مجوز | MIT |
# 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 \<noreply@localhost\>")
### Example
See here https://github.com/fastack-dev/fastack-mail/tree/main/examples/mail
نیازمندی
| مقدار | نام |
|---|---|
| >=4.0.0,<5.0.0 | fastack |
| >=1.1.6,<2.0.0 | aiosmtplib |
| >=1.9.0,<2.0.0 | pydantic[email] |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<3.10 | Python |
نحوه نصب
نصب پکیج whl fastack-mail-0.1.0:
pip install fastack-mail-0.1.0.whl
نصب پکیج tar.gz fastack-mail-0.1.0:
pip install fastack-mail-0.1.0.tar.gz