Flask extension for sending email
Project description
Flask-Mail
Flask-Mail is an extension for Flask that makes it easy to send emails from your application. It simplifies the process of integrating email functionality, allowing you to focus on building great features for your application.
Pallets Community Ecosystem
[!IMPORTANT]
This project is part of the Pallets Community Ecosystem. Pallets is the open source organization that maintains Flask; Pallets-Eco enables community maintenance of related projects. If you are interested in helping maintain this project, please reach out on the Pallets Discord server.
A Simple Example
from flask import Flask
from flask_mail import Mail, Message
app = Flask(__name__)
app.config['MAIL_SERVER'] = 'your_mail_server'
app.config['MAIL_PORT'] = 587
app.config['MAIL_USE_TLS'] = True
app.config['MAIL_USE_SSL'] = False
app.config['MAIL_USERNAME'] = 'your_username'
app.config['MAIL_PASSWORD'] = 'your_password'
app.config['MAIL_DEFAULT_SENDER'] = 'your_email@example.com'
mail = Mail(app)
@app.route('/')
def send_email():
msg = Message(
'Hello',
recipients=['recipient@example.com'],
body='This is a test email sent from Flask-Mail!'
)
mail.send(msg)
return 'Email sent succesfully!'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flask_mail-0.10.0.tar.gz
.
File metadata
- Download URL: flask_mail-0.10.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44083e7b02bbcce792209c06252f8569dd5a325a7aaa76afe7330422bd97881d |
|
MD5 | 3e303fc8203d592c9af3e96ac0f8bbbf |
|
BLAKE2b-256 | ba29e92dc84c675d1e8d260d5768eb3fb65c70cbd33addecf424187587bee862 |
File details
Details for the file flask_mail-0.10.0-py3-none-any.whl
.
File metadata
- Download URL: flask_mail-0.10.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a451e490931bb3441d9b11ebab6812a16bfa81855792ae1bf9c1e1e22c4e51e7 |
|
MD5 | 2b443eae0c006baf7d5d0398592b8d1b |
|
BLAKE2b-256 | e4c0a81083da779f482494d49195d8b6c9fde21072558253e4a9fb2ec969c3c1 |