Postmark Flask extension
Project description
Flask Postmark
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)
Built Distribution
Close
Hashes for Flask_Postmark-0.3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57c4527d6022c9c44e96d83c29704b65dd156d5d62e925490276e7584c3f98a7 |
|
MD5 | 81c4be04bbf1532f502cb171bf301b41 |
|
BLAKE2b-256 | c857281e866ddc1104bef73574445f379ca7f4ee2306314ac39cfa0f823bab23 |