Skip to main content

A Flask extension for sending emails via Mailjet API.

Project description

Flask-Mailjet

A lightweight Flask extension for sending emails using the Mailjet API.

Installation

pip install flask-mailjet

Usage

from flask import Flask
from flask_mailjet import Mailjet

app = Flask(__name__)
app.config["MAILJET_API_KEY"] = "your-key"
app.config["MAILJET_API_SECRET"] = "your-secret"

mailjet = Mailjet(app)

@app.route("/send")
def send():
    mailjet.send_email(
        sender={"Email": "info@example.com", "Name": "Example"},
        recipients="user@example.com",
        subject="Hello",
        html="<h1>Hello World</h1>"
    )
    return "sent"

Build the package

In your project root:

pip install build
python -m build

This produces:

dist/
    flask_mailjet-0.1.0.tar.gz
    flask_mailjet-0.1.0-py3-none-any.whl

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_mailjet-0.3.3.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

flask_mailjet-0.3.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file flask_mailjet-0.3.3.tar.gz.

File metadata

  • Download URL: flask_mailjet-0.3.3.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for flask_mailjet-0.3.3.tar.gz
Algorithm Hash digest
SHA256 1a6b2a1c9a8b1306df40fab69ba9e066d8f244d8d9d9b581283c3cd55f2c403f
MD5 4c98e6e14cc52b7b45261788006389e3
BLAKE2b-256 cf1237464a324200f72dee2b2298625e068ba45bfe7a94beb4e65ffe9899a626

See more details on using hashes here.

File details

Details for the file flask_mailjet-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: flask_mailjet-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for flask_mailjet-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 52168034f03f326550897c12af7772d1fbdc9c0dd3470a68f3fe63397ea64022
MD5 c4e0181fa8c5c7d080791c4b8fc239e3
BLAKE2b-256 741abf25cdc055a6b8d3f8f661e431236aa1239fad63b55ec468115718e5b25d

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