add smtp docs

This commit is contained in:
grillazz 2025-01-28 20:08:30 +01:00
parent 075a884f10
commit daae24dd71
3 changed files with 21 additions and 0 deletions

4
.env
View File

@ -16,5 +16,9 @@ REDIS_DB=2
JWT_EXPIRE=3600 JWT_EXPIRE=3600
JWT_ALGORITHM=HS256 JWT_ALGORITHM=HS256
# SMTP
EMAIL_HOST=
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=

1
.gitignore vendored
View File

@ -128,3 +128,4 @@ dmypy.json
# Pyre type checker # Pyre type checker
.pyre/ .pyre/
/requirements-dev.txt /requirements-dev.txt
/.env.smtp

View File

@ -29,6 +29,7 @@
<li><a href="#local-development-with-poetry">Local development with poetry</a></li> <li><a href="#local-development-with-poetry">Local development with poetry</a></li>
<li><a href="#import-xlsx-files-with-polars-and-calamine">Import xlsx files with polars and calamine</a></li> <li><a href="#import-xlsx-files-with-polars-and-calamine">Import xlsx files with polars and calamine</a></li>
<li><a href="#worker-aware-async-scheduler">Schedule jobs</a></li> <li><a href="#worker-aware-async-scheduler">Schedule jobs</a></li>
<li><a href="#smtp-setup">Email Configuration</a></li>
</ul> </ul>
</li> </li>
<li><a href="#acknowledgments">Acknowledgments</a></li> <li><a href="#acknowledgments">Acknowledgments</a></li>
@ -150,6 +151,20 @@ It allows you to schedule jobs to run at specific times or intervals, and it sup
The library is designed to be easy to use and highly configurable, making it suitable for a wide range of use cases. The library is designed to be easy to use and highly configurable, making it suitable for a wide range of use cases.
It was added to project in version 4.0.0a5 with Redis as event broker and SQLAlchemy as data store. It was added to project in version 4.0.0a5 with Redis as event broker and SQLAlchemy as data store.
<p align="right">(<a href="#readme-top">back to top</a>)</p>
### SMTP setup :email:
The project uses the `smtplib` library to send emails.
The `smtplib` library is a built-in Python library that provides a simple interface for sending emails using the Simple Mail Transfer Protocol (SMTP).
It allows you to connect to an SMTP server, send an email message, and disconnect from the server.
The library is easy to use and provides a flexible and powerful way to send emails from your Python applications.
SMTPEmailService provides a reusable interface to send emails via an SMTP server.
This service supports plaintext and HTML emails, and also allows sending template-based emails using the Jinja2 template engine.
It is implemented as a singleton to ensure that only one SMTP connection is maintained
throughout the application lifecycle, optimizing resource usage.
<p align="right">(<a href="#readme-top">back to top</a>)</p> <p align="right">(<a href="#readme-top">back to top</a>)</p>
## Acknowledgments ## Acknowledgments
@ -190,6 +205,7 @@ I've included a few of my favorites to kick things off!
- **[AUG 17 2024]** granian use case implemented with docker compose and rich logger :fast_forward: - **[AUG 17 2024]** granian use case implemented with docker compose and rich logger :fast_forward:
- **[OCT 16 2024]** apscheduler added to project :fast_forward: - **[OCT 16 2024]** apscheduler added to project :fast_forward:
- **[DEC 16 2024]** bump project to Python 3.13 :fast_forward: - **[DEC 16 2024]** bump project to Python 3.13 :fast_forward:
- **[JAN 28 2025]** add SMTP setup :email:
<p align="right">(<a href="#readme-top">back to top</a>)</p> <p align="right">(<a href="#readme-top">back to top</a>)</p>