Skip to content

add smtp docs #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -16,5 +16,9 @@ REDIS_DB=2
JWT_EXPIRE=3600
JWT_ALGORITHM=HS256

# SMTP
EMAIL_HOST=
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -128,3 +128,4 @@ dmypy.json
# Pyre type checker
.pyre/
/requirements-dev.txt
/.env.smtp
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@
<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="#worker-aware-async-scheduler">Schedule jobs</a></li>
<li><a href="#smtp-setup">Email Configuration</a></li>
</ul>
</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.
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>

## 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:
- **[OCT 16 2024]** apscheduler added to project :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>