Skip to main content

Postmark Flask extension

Project description

Flask Postmark

Build Coverage Version Python versions Documentation Status License

This is a simple integration with Postmark for Flask applications.

Installation

Installing is simple with pip:

$ pip install flask-postmark

Usage

To send an email in your Flask application:

from flask import Flask
from flask_postmark import Postmark

app = Flask(__name__)
app.config["POSTMARK_SERVER_TOKEN"] = "<replace with your server token>"

postmark = Postmark(app)


@app.route("/send", methods=["POST"])
def send():
    postmark.send(
        From="sender@example.com",
        To="receiver@example.com",
        Subject="Postmark test",
        HtmlBody="<html><body><strong>Hello</strong> dear Postmark user.</body></html>",
    )
    return b"OK"

Documentation

You can view the documentation online at:

Or you can look at the docs/ directory in the repository.

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-Postmark-0.3.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

Flask_Postmark-0.3.1-py2.py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 2 Python 3

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