Skip to main content

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.

Release files for Flask-Postmark 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Flask-Postmark 0.3.1
File Size Uploaded
Flask-Postmark-0.3.1.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Flask-Postmark 0.3.1
File Interpreter ABI Platform
Flask_Postmark-0.3.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 7.7 kB

Release files / Flask-Postmark-0.3.1.tar.gz

Download URL Flask-Postmark-0.3.1.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a9b124ffb7e64c2ea838abc6857ff3acd783d574da9a4203f3d82a6c877d1b72
BLAKE2b-256 checksum
How to use checksums
1a345395aabc418a28dd19ad835f31ad7c736d7683514befd44ab3944189f31c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / Flask_Postmark-0.3.1-py2.py3-none-any.whl

Download URL Flask_Postmark-0.3.1-py2.py3-none-any.whl
Size 3.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
57c4527d6022c9c44e96d83c29704b65dd156d5d62e925490276e7584c3f98a7
BLAKE2b-256 checksum
How to use checksums
c857281e866ddc1104bef73574445f379ca7f4ee2306314ac39cfa0f823bab23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page