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_USER"] = "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.2.0.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Flask_Redmail-0.2.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file Flask-Redmail-0.2.0.tar.gz.

File metadata

  • Download URL: Flask-Redmail-0.2.0.tar.gz
  • Upload date:
  • Size: 23.0 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.2.0.tar.gz
Algorithm Hash digest
SHA256 ef2aa8a9e97aae4d26d0bd3b449fa3ecd84a06e59158eb48c5411536c2b80caf
MD5 cea943f8508f3a6f67c3882dc4603f2b
BLAKE2b-256 06f5b8cb3d185c79ef13d753479cee30ee586d1169259a62663fd471b4a3c789

See more details on using hashes here.

File details

Details for the file Flask_Redmail-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: Flask_Redmail-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6180eae1636cf70598393f2da15775725fc87b4deb1198c53cdb8890e9110d4f
MD5 d83c7e4218f63944f867e1820684a319
BLAKE2b-256 f85b7bfc82ccb91cb6e41b0a306890b95b67641e16fb28c14402227ac79db2d7

See more details on using hashes here.

Supported by

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