Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miksus/flask-redmail
Email sending for Flask
https://github.com/miksus/flask-redmail
email flask redmail
Last synced: 2 months ago
JSON representation
Email sending for Flask
- Host: GitHub
- URL: https://github.com/miksus/flask-redmail
- Owner: Miksus
- License: mit
- Created: 2022-01-30T19:38:36.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-19T08:19:44.000Z (almost 3 years ago)
- Last Synced: 2024-10-11T10:04:09.933Z (2 months ago)
- Topics: email, flask, redmail
- Language: Python
- Homepage: https://flask-redmail.readthedocs.io/
- Size: 89.8 KB
- Stars: 19
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask Red Mail: Email Sending for Flask
> Flask extension for Red Mail---
[![Pypi version](https://badgen.net/pypi/v/flask_redmail)](https://pypi.org/project/flask_redmail/)
[![build](https://github.com/Miksus/flask-redmail/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/Miksus/flask-redmail/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/Miksus/flask-redmail/branch/master/graph/badge.svg?token=IMR1CQT9PY)](https://codecov.io/gh/Miksus/flask-redmail)
[![Documentation Status](https://readthedocs.org/projects/flask-redmail/badge/?version=latest)](https://red-mail.readthedocs.io/en/latest/)
[![PyPI pyversions](https://badgen.net/pypi/python/flask-redmail)](https://pypi.org/project/flask-redmail/)## What is it?
Flask Red Mail is a Flask extension for [Red Mail](https://github.com/Miksus/red-mail).
Red Mail is a powerful email sender library capable of including
attachments from various formats, embedding images, parametrization
with Jinja etc. This library harness the power of Red Mail in order to
make it trivial to:- Send verification emails to users
- Create email based *forgot password* functionality
- Create Flask based email news letters
- Handle other needs for sending emails from a web applicationLinks:
- [Flask-Redmail's source code](https://github.com/Miksus/flask-redmail)
- [Flask-Redmail's documentation](https://flask-redmail.readthedocs.io/)
- [Flask-Redmail's releases (PyPI)](https://pypi.org/project/Flask-Redmail/)
- [Red Mail's source code](https://github.com/Miksus/red-mail)
- [Red Mail's documentation](https://red-mail.readthedocs.io/)
- [Red Mail's releases (PyPI)](https://pypi.org/project/redmail/)## Installation
Install the extension from PyPI:
```console
pip install flask-redmail
```## Example
Create a simple Flask application:
```python
import flask
from flask_redmail import RedMailapp = flask.Flask(__name__)
email = RedMail(app)# Configure
app.config["EMAIL_HOST"] = "localhost"
app.config["EMAIL_PORT"] = 0# Optional
app.config["EMAIL_USERNAME"] = "[email protected]"
app.config["EMAIL_PASSWORD"] = ""
app.config["EMAIL_SENDER"] = "[email protected]"
```Use the extension:
```python
@app.route("/send")
def send_email():
email.send(
subject="An example",
receivers=["[email protected]"],
html="An example email.
"
)
```---
## Author
* **Mikael Koli** - [Miksus](https://github.com/Miksus) - [email protected]