Skip to main content

Email sending for Flask

Project description

Flask Red Mail: Email Sending for Flask

Flask extension for Red Mail


Pypi version build codecov Documentation Status PyPI pyversions

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:

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

Project details


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)

Uploaded Source

Built Distribution

Flask_Redmail-0.3.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

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

Hashes for Flask-Redmail-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5869faec2c7355325d6fe08e0e6f2fb54f9bff88706706a4f9fa0bebb8276efe
MD5 16d22c7f2901293c7a59f84dde1ae4ea
BLAKE2b-256 eb65082b4db3da3d52063ae744b0818d73e5d67fa51a32202e3429321858ed6c

See more details on using hashes here.

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

Hashes for Flask_Redmail-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f888866b968264f7afd4329de3ed9d881686eb77ca4389dec7d861837a8477fe
MD5 7389da1df620c652cfdc7c027a466452
BLAKE2b-256 f68d90cc7ebabe9810d1ecea36c4637f9f1f22bfdb7006c845105350fb615f94

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page