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.0.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for Flask_Postmark-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82ce0b16b7483b24e3a57855750086719a02dd9e85dfa6a19b225e88045135f8 |
|
MD5 | 8153fc0a5bb8c31d3a9130784330b6d8 |
|
BLAKE2b-256 | 48c31b3df9d3a797cb2447bb35d44990dff134224670a670bd48a279f12f098f |