https://github.com/davidism/flask-email-simplified
Send email in Flask using the Email-Simplified library.
https://github.com/davidism/flask-email-simplified
email flask python smtp
Last synced: 9 months ago
JSON representation
Send email in Flask using the Email-Simplified library.
- Host: GitHub
- URL: https://github.com/davidism/flask-email-simplified
- Owner: davidism
- License: mit
- Created: 2025-02-12T01:21:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-14T19:54:47.000Z (about 1 year ago)
- Last Synced: 2025-06-19T16:59:57.582Z (about 1 year ago)
- Topics: email, flask, python, smtp
- Language: Python
- Homepage: https://flask-email-simplified.readthedocs.io
- Size: 116 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Flask-Email-Simplified
Flask-Email-Simplified is a [Flask]/[Quart] extension that provides email
sending capability using the [Email-Simplified] library.
Email-Simplified provides a much simpler interface for creating and sending
email messages compared to Python's `email` and `smtplib` modules. It also
defines an interface for using other email sending providers that offer an API
other than SMTP.
[Flask]: https://flask.palletsprojects.com
[Quart]: https://quart.palletsprojects.com
[Email-Simplified]: https://email-simplified.readthedocs.io
## Install
Install from [PyPI]:
```text
$ pip install flask-email-simplified
```
[PyPI]: https://pypi.org/project/flask-email-simiplified
## Example
```python
from email_simplified import Message
from flask import Flask
from flask_email_simplified import EmailExtension
app = Flask(__name__)
app.config["EMAIL_HOST"] = "localhost"
app.config["EMAIL_PORT"] = 25
email = EmailExtension(app)
@app.get("/send")
def hello():
message = Message(
subject="Hello",
text="Hello, World!",
to=["world@example.test"],
)
email.send(message)
return "Hello, World!"
```