Skip to content

Commit daae24d

Browse files
committed
add smtp docs
1 parent 075a884 commit daae24d

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

.env

+4
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,9 @@ REDIS_DB=2
1616
JWT_EXPIRE=3600
1717
JWT_ALGORITHM=HS256
1818

19+
# SMTP
20+
EMAIL_HOST=
21+
EMAIL_HOST_USER=
22+
EMAIL_HOST_PASSWORD=
1923

2024

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,4 @@ dmypy.json
128128
# Pyre type checker
129129
.pyre/
130130
/requirements-dev.txt
131+
/.env.smtp

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<li><a href="#local-development-with-poetry">Local development with poetry</a></li>
3030
<li><a href="#import-xlsx-files-with-polars-and-calamine">Import xlsx files with polars and calamine</a></li>
3131
<li><a href="#worker-aware-async-scheduler">Schedule jobs</a></li>
32+
<li><a href="#smtp-setup">Email Configuration</a></li>
3233
</ul>
3334
</li>
3435
<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
150151
The library is designed to be easy to use and highly configurable, making it suitable for a wide range of use cases.
151152
It was added to project in version 4.0.0a5 with Redis as event broker and SQLAlchemy as data store.
152153

154+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
155+
156+
### SMTP setup :email:
157+
The project uses the `smtplib` library to send emails.
158+
The `smtplib` library is a built-in Python library that provides a simple interface for sending emails using the Simple Mail Transfer Protocol (SMTP).
159+
It allows you to connect to an SMTP server, send an email message, and disconnect from the server.
160+
The library is easy to use and provides a flexible and powerful way to send emails from your Python applications.
161+
162+
SMTPEmailService provides a reusable interface to send emails via an SMTP server.
163+
This service supports plaintext and HTML emails, and also allows sending template-based emails using the Jinja2 template engine.
164+
It is implemented as a singleton to ensure that only one SMTP connection is maintained
165+
throughout the application lifecycle, optimizing resource usage.
166+
167+
153168
<p align="right">(<a href="#readme-top">back to top</a>)</p>
154169

155170
## Acknowledgments
@@ -190,6 +205,7 @@ I've included a few of my favorites to kick things off!
190205
- **[AUG 17 2024]** granian use case implemented with docker compose and rich logger :fast_forward:
191206
- **[OCT 16 2024]** apscheduler added to project :fast_forward:
192207
- **[DEC 16 2024]** bump project to Python 3.13 :fast_forward:
208+
- **[JAN 28 2025]** add SMTP setup :email:
193209

194210
<p align="right">(<a href="#readme-top">back to top</a>)</p>
195211

0 commit comments

Comments
 (0)