Flask-Mail
Flask extension for sending email
What it is and what it does
Flask-Mail is a Flask extension that wraps SMTP email delivery into a simple, application-integrated interface. It lets you configure mail server credentials once in your Flask config, then send emails by creating Message objects and calling mail.send(). The package handles the SMTP connection lifecycle and integrates with Flask's application context.
It depends on flask for the application framework and blinker for signal support. The extension is maintained by the Pallets Community Ecosystem (the organization behind Flask itself) and remains actively developed. It is classified as Beta but has been in use since 2010, making it a stable choice for straightforward email needs in Flask applications.
Use it for:
- Send transactional emails (password resets, account confirmations) from a Flask web application.
- Notify administrators or users of application events (errors, new signups, reports).
- Deliver bulk emails to a mailing list with per-recipient customization.
- Integrate email into Flask request handlers without managing SMTP connections directly.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Flask-Mail adds email-sending functionality to Flask applications, handling SMTP configuration and message composition through a simple API.
Yes. Flask-Mail is a lightweight, permissive-licensed extension with low install friction and active maintenance. It is the standard choice for email in Flask applications when you need straightforward SMTP integration. Install it if your Flask app needs to send emails and you prefer a simple, Flask-native API over raw SMTP.
Install
flask-mail on PyPI
pip
pip install flask-mailuv
uv add flask-mailpoetry
poetry add flask-mailInstalling Flask-Mail
Before you install
Low install friction with only two runtime dependencies (flask and blinker). Actively maintained as of June 2026 with recent commits; marked Beta but part of the Pallets Community Ecosystem.
License in practice
Permissive BSD license allows commercial and private use with minimal restrictions.
Quickstart
pip install flask-mail
from flask import Flask
from flask_mail import Mail, Message
app = Flask(__name__)
app.config['MAIL_SERVER'] = 'smtp.example.com'
app.config['MAIL_PORT'] = 587
app.config['MAIL_USERNAME'] = 'user@example.com'
app.config['MAIL_PASSWORD'] = 'password'
mail = Mail(app)
msg = Message('Subject', recipients=['to@example.com'], body='Body')
mail.send(msg)
Requires a configured SMTP server (local or remote) and valid credentials; Python 3.8 or later.
Verify before relying
- Whether the package supports async/background email sending or only synchronous delivery.
- Support for email templates, attachments, or HTML rendering beyond plain text.
- Rate limiting or retry logic for failed sends.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — flask, blinker |
| Maintenance | actively maintained — 813 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,577,307/month — #3,745 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flask_mail-0.10.0-py3-none-any.whl
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
Flask-CachingFlask-Caching adds caching support to Flask…
permissive · top 5,000 on PyPI
Flask-SQLAlchemyFlask-SQLAlchemy integrates SQLAlchemy database…
permissive · top 1,000 on PyPI
redmailRedmail simplifies sending emails with Python…
permissive · top 15,000 on PyPI
django-post_officeDjango Post Office queues and sends emails…
permissive · top 15,000 on PyPI
dj-email-urlConfigures Django email backends from…
permissive · top 15,000 on PyPI
Flask-DebugToolbarFlask-DebugToolbar injects a debugging sidebar…
permissive · top 5,000 on PyPI
sendsafelyIntegrates SendSafely secure file transfer and…
permissive · top 15,000 on PyPI
flask-mongoengineFlask-MongoEngine integrates MongoEngine…
permissive · top 15,000 on PyPI
Flask-SecurityFlask-Security adds authentication,…
permissive · top 15,000 on PyPI
Flask-DatadogFlask-Datadog provides a Flask extension to…
permissive · top 15,000 on PyPI