Email sending for Flask
Project description
Flask Red Mail: Email Sending for Flask
Flask extension for Red Mail
What is it?
Flask Red Mail is a Flask extension for 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 application
Links:
- Flask-Redmail's source code
- Flask-Redmail's documentation
- Flask-Redmail's releases (PyPI)
- Red Mail's source code
- Red Mail's documentation
- Red Mail's releases (PyPI)
Installation
Install the extension from PyPI:
pip install flask-redmail
Example
Create a simple Flask application:
import flask
from flask_redmail import RedMail
app = flask.Flask(__name__)
email = RedMail(app)
# Configure
app.config["EMAIL_HOST"] = "localhost"
app.config["EMAIL_PORT"] = 0
# Optional
app.config["EMAIL_USERNAME"] = "me@example.com"
app.config["EMAIL_PASSWORD"] = "<PASSWORD>"
app.config["EMAIL_SENDER"] = "no-reply@example.com"
Use the extension:
@app.route("/send")
def send_email():
email.send(
subject="An example",
receivers=["you@example.com"],
html="<h1>An example email.</h1>"
)
Author
- Mikael Koli - Miksus - koli.mikael@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-Redmail-0.3.0.tar.gz
(23.5 kB
view details)
Built Distribution
File details
Details for the file Flask-Redmail-0.3.0.tar.gz
.
File metadata
- Download URL: Flask-Redmail-0.3.0.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5869faec2c7355325d6fe08e0e6f2fb54f9bff88706706a4f9fa0bebb8276efe |
|
MD5 | 16d22c7f2901293c7a59f84dde1ae4ea |
|
BLAKE2b-256 | eb65082b4db3da3d52063ae744b0818d73e5d67fa51a32202e3429321858ed6c |
File details
Details for the file Flask_Redmail-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: Flask_Redmail-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f888866b968264f7afd4329de3ed9d881686eb77ca4389dec7d861837a8477fe |
|
MD5 | 7389da1df620c652cfdc7c027a466452 |
|
BLAKE2b-256 | f68d90cc7ebabe9810d1ecea36c4637f9f1f22bfdb7006c845105350fb615f94 |