Best Flask open-source libraries and packages

Flask mailing

Flask-Mailing is the ultimate solution for sending emails asynchronously in Flask applications. With its extensive features such as support for multiple email providers, file attachments, customizable templates, and encryption, Flask-Mailing makes email communication effortless and efficient.
Updated 3 months ago

✉️ Flask-Mailing

Flask mail logo

Flask-Mailing is a highly efficient and user-friendly package that enables Asynchronous email messaging in Flask applications. Asynchronous email messaging is becoming increasingly popular because it allows applications to continue running while emails are being sent in the background. This makes it an ideal solution for time-sensitive applications that require a fast and responsive user experience.

With Flask-Mailing, developers can easily integrate asynchronous email messaging capabilities into their Flask applications without the need for complex configurations or additional dependencies. The package offers a variety of features, including support for multiple email providers, email templates, and error handling. It also supports common email protocols, such as SMTP, SSL, and TLS.

Moreover, Flask-Mailing offers a simple and intuitive API that allows developers to easily send emails in the background. It also provides advanced features, such as email tracking and reporting, which enable developers to monitor email performance and user engagement.

Whether you're building a small-scale application or a large-scale enterprise system, Flask-Mailing provides a reliable and scalable solution for Asynchronous email messaging in Flask applications.

Star History

Star History Chart

Key Features ✨

  1. 🔄 Supports asynchronous email sending using the built-in asyncio library in Python 3.5+.

  2. 🔗 Easily integrates with Flask applications using the provided Mail extension.

  3. ⚙️ Offers simple and intuitive configuration options for email providers such as SMTP, Sendgrid, and Mailgun.

  4. ✉️ Supports HTML and plain-text message formats, as well as the option to send both formats in a multi-part message.

  5. 📎 Provides support for file attachments in emails.

  6. 🎨 Includes customizable email templates and support for Jinja2 templates.

  7. 🚀 Offers a simple API for sending email messages, allowing for quick and easy implementation in any Flask project.

  8. 📧 Supports bulk email sending, allowing for the efficient delivery of messages to large email lists.

  9. 📑 Provides options for customizing email headers and message priority levels.

  10. 📈 Supports email tracking through message IDs and delivery status notifications.

  11. 🔬 Includes a comprehensive testing suite for ensuring the correct configuration and behavior of the email sending functionality.

  12. 🔒 Supports email encryption and authentication using TLS and SSL protocols.

  13. ⚠️ Offers error handling and logging functionality for tracking and resolving email sending issues.

  14. 📖 Provides detailed documentation and active community support for resolving any issues or questions related to the package.

More information on Getting-Started

📥 Downloads

Downloads Downloads Downloads

🚑 Package health score by snyk.io

Flask-Mailing

🔗 Important Links

❤️ Github

📄 Documentation

🐍 PYPI

🔨 Installation

 pip install flask-mailing

or install from the source code

git clone https://github.com/marktennyson/flask-mailing.git && cd flask-mailing
python -m pip install .

🦮 Guide

from flask import Flask, jsonify
from flask_mailing import Mail, Message

app = Flask(__name__)

app.config['MAIL_USERNAME'] = "YourUserName"
app.config['MAIL_PASSWORD'] = "strong_password"
app.config['MAIL_PORT'] = 587
app.config['MAIL_SERVER'] = "your mail server"
app.config['MAIL_USE_TLS'] = True
app.config['MAIL_USE_SSL'] = False
app.config['USE_CREDENTIALS'] = True
app.config['VALIDATE_CERTS'] = True
app.config['MAIL_DEFAULT_SENDER'] = "youremailid@doaminname.com"

mail = Mail(app)

html = """
<p>Thanks for using Flask-Mailing</p> 
"""


@app.post("/email")
async def simple_send():
    message = Message(
        subject="Flask-Mailing module",
        recipients=["recipients@email-domain.com"],  # List of recipients, as many as you can pass 
        body=html,
        subtype="html"
        )
    await mail.send_message(message)
    return jsonify(status_code=200, content={"message": "email has been sent"})     

🪜 List of Examples

For more examples of using flask-mailing please check example section

👍 Contributing

Feel free to open issues and send pull requests.

😀 Contributors ✨

Thanks go to these wonderful people ([🚧]):



Aniket Sarkar

💬 👀 🚧

Joshua Kinslow


Alexandre Gramfort


ahmetkurukose


Sriram


CharlesTWood

This project follows the all-contributors specification. Contributions of any kind are welcome!

Before you start please read CONTRIBUTING

📝 LICENSE

MIT